| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| node-npmtest-elasticsearch/ | 100% | (151 / 151) | 100% | (124 / 124) | 100% | (27 / 27) | 100% | (151 / 151) | |
| node-npmtest-elasticsearch/node_modules/elasticsearch/src/ | 85.71% | (6 / 7) | 100% | (0 / 0) | 0% | (0 / 1) | 85.71% | (6 / 7) | |
| node-npmtest-elasticsearch/node_modules/elasticsearch/src/lib/ | 21.63% | (241 / 1114) | 5.32% | (40 / 752) | 8.23% | (13 / 158) | 21.89% | (241 / 1101) | |
| node-npmtest-elasticsearch/node_modules/elasticsearch/src/lib/apis/ | 99.29% | (1967 / 1981) | 100% | (0 / 0) | 41.67% | (10 / 24) | 99.29% | (1967 / 1981) | |
| node-npmtest-elasticsearch/node_modules/elasticsearch/src/lib/connectors/ | 26.52% | (35 / 132) | 2.08% | (1 / 48) | 5% | (1 / 20) | 27.13% | (35 / 129) | |
| node-npmtest-elasticsearch/node_modules/elasticsearch/src/lib/loggers/ | 45.16% | (42 / 93) | 0% | (0 / 35) | 0% | (0 / 19) | 45.16% | (42 / 93) | |
| node-npmtest-elasticsearch/node_modules/elasticsearch/src/lib/selectors/ | 42.86% | (3 / 7) | 100% | (0 / 0) | 0% | (0 / 2) | 42.86% | (3 / 7) | |
| node-npmtest-elasticsearch/node_modules/elasticsearch/src/lib/serializers/ | 41.67% | (15 / 36) | 0% | (0 / 18) | 0% | (0 / 6) | 42.86% | (15 / 35) | |
| node-npmtest-elasticsearch/node_modules/elasticsearch/src/lib/transport/ | 12.12% | (4 / 33) | 0% | (0 / 13) | 0% | (0 / 7) | 12.5% | (4 / 32) |
| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| example.js | 100% | (83 / 83) | 100% | (73 / 73) | 100% | (12 / 12) | 100% | (83 / 83) | |
| lib.npmtest_elasticsearch.js | 100% | (16 / 16) | 100% | (14 / 14) | 100% | (3 / 3) | 100% | (16 / 16) | |
| test.js | 100% | (52 / 52) | 100% | (37 / 37) | 100% | (12 / 12) | 100% | (52 / 52) |
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 | 2 2 2 2 2 2 2 1 2 2 2 2 1 2 2 2 2 2 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 2 2 2 2 2 1 2 2 2 1 3 1 1 1 1 1 1 1 1 1 1 1 1 6 6 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | /*
example.js
quickstart example
instruction
1. save this script as example.js
2. run the shell command:
$ npm install npmtest-elasticsearch && PORT=8081 node example.js
3. play with the browser-demo on http://127.0.0.1:8081
*/
/* istanbul instrument in package npmtest_elasticsearch */
/*jslint
bitwise: true,
browser: true,
maxerr: 8,
maxlen: 96,
node: true,
nomen: true,
regexp: true,
stupid: true
*/
(function () {
'use strict';
var local;
// run shared js-env code - pre-init
(function () {
// init local
local = {};
// init modeJs
local.modeJs = (function () {
try {
return typeof navigator.userAgent === 'string' &&
typeof document.querySelector('body') === 'object' &&
typeof XMLHttpRequest.prototype.open === 'function' &&
'browser';
} catch (errorCaughtBrowser) {
return module.exports &&
typeof process.versions.node === 'string' &&
typeof require('http').createServer === 'function' &&
'node';
}
}());
// init global
local.global = local.modeJs === 'browser'
? window
: global;
// init utility2_rollup
local = local.global.utility2_rollup || (local.modeJs === 'browser'
? local.global.utility2_npmtest_elasticsearch
: global.utility2_moduleExports);
// export local
local.global.local = local;
}());
switch (local.modeJs) {
// post-init
// run browser js-env code - post-init
/* istanbul ignore next */
case 'browser':
local.testRunBrowser = function (event) {
Eif (!event || (event &&
event.currentTarget &&
event.currentTarget.className &&
event.currentTarget.className.includes &&
event.currentTarget.className.includes('onreset'))) {
// reset output
Array.from(
document.querySelectorAll('body > .resettable')
).forEach(function (element) {
switch (element.tagName) {
case 'INPUT':
case 'TEXTAREA':
element.value = '';
break;
default:
element.textContent = '';
}
});
}
switch (event && event.currentTarget && event.currentTarget.id) {
case 'testRunButton1':
// show tests
Eif (document.querySelector('#testReportDiv1').style.display === 'none') {
document.querySelector('#testReportDiv1').style.display = 'block';
document.querySelector('#testRunButton1').textContent =
'hide internal test';
local.modeTest = true;
local.testRunDefault(local);
// hide tests
} else {
document.querySelector('#testReportDiv1').style.display = 'none';
document.querySelector('#testRunButton1').textContent = 'run internal test';
}
break;
// custom-case
default:
break;
}
Iif (document.querySelector('#inputTextareaEval1') && (!event || (event &&
event.currentTarget &&
event.currentTarget.className &&
event.currentTarget.className.includes &&
event.currentTarget.className.includes('oneval')))) {
// try to eval input-code
try {
/*jslint evil: true*/
eval(document.querySelector('#inputTextareaEval1').value);
} catch (errorCaught) {
console.error(errorCaught);
}
}
};
// log stderr and stdout to #outputTextareaStdout1
['error', 'log'].forEach(function (key) {
console[key + '_original'] = console[key];
console[key] = function () {
var element;
console[key + '_original'].apply(console, arguments);
element = document.querySelector('#outputTextareaStdout1');
Iif (!element) {
return;
}
// append text to #outputTextareaStdout1
element.value += Array.from(arguments).map(function (arg) {
return typeof arg === 'string'
? arg
: JSON.stringify(arg, null, 4);
}).join(' ') + '\n';
// scroll textarea to bottom
element.scrollTop = element.scrollHeight;
};
});
// init event-handling
['change', 'click', 'keyup'].forEach(function (event) {
Array.from(document.querySelectorAll('.on' + event)).forEach(function (element) {
element.addEventListener(event, local.testRunBrowser);
});
});
// run tests
local.testRunBrowser();
break;
// run node js-env code - post-init
/* istanbul ignore next */
case 'node':
// export local
module.exports = local;
// require modules
local.fs = require('fs');
local.http = require('http');
local.url = require('url');
// init assets
local.assetsDict = local.assetsDict || {};
/* jslint-ignore-begin */
local.assetsDict['/assets.index.template.html'] = '\
<!doctype html>\n\
<html lang="en">\n\
<head>\n\
<meta charset="UTF-8">\n\
<meta name="viewport" content="width=device-width, initial-scale=1">\n\
<title>{{env.npm_package_name}} (v{{env.npm_package_version}})</title>\n\
<style>\n\
/*csslint\n\
box-sizing: false,\n\
universal-selector: false\n\
*/\n\
* {\n\
box-sizing: border-box;\n\
}\n\
body {\n\
background: #dde;\n\
font-family: Arial, Helvetica, sans-serif;\n\
margin: 2rem;\n\
}\n\
body > * {\n\
margin-bottom: 1rem;\n\
}\n\
.utility2FooterDiv {\n\
margin-top: 20px;\n\
text-align: center;\n\
}\n\
</style>\n\
<style>\n\
/*csslint\n\
*/\n\
textarea {\n\
font-family: monospace;\n\
height: 10rem;\n\
width: 100%;\n\
}\n\
textarea[readonly] {\n\
background: #ddd;\n\
}\n\
</style>\n\
</head>\n\
<body>\n\
<!-- utility2-comment\n\
<div id="ajaxProgressDiv1" style="background: #d00; height: 2px; left: 0; margin: 0; padding: 0; position: fixed; top: 0; transition: background 0.5s, width 1.5s; width: 25%;"></div>\n\
utility2-comment -->\n\
<h1>\n\
<!-- utility2-comment\n\
<a\n\
{{#if env.npm_package_homepage}}\n\
href="{{env.npm_package_homepage}}"\n\
{{/if env.npm_package_homepage}}\n\
target="_blank"\n\
>\n\
utility2-comment -->\n\
{{env.npm_package_name}} (v{{env.npm_package_version}})\n\
<!-- utility2-comment\n\
</a>\n\
utility2-comment -->\n\
</h1>\n\
<h3>{{env.npm_package_description}}</h3>\n\
<!-- utility2-comment\n\
<h4><a download href="assets.app.js">download standalone app</a></h4>\n\
<button class="onclick onreset" id="testRunButton1">run internal test</button><br>\n\
<div id="testReportDiv1" style="display: none;"></div>\n\
utility2-comment -->\n\
\n\
\n\
\n\
<label>stderr and stdout</label>\n\
<textarea class="resettable" id="outputTextareaStdout1" readonly></textarea>\n\
<!-- utility2-comment\n\
{{#if isRollup}}\n\
<script src="assets.app.js"></script>\n\
{{#unless isRollup}}\n\
utility2-comment -->\n\
<script src="assets.utility2.rollup.js"></script>\n\
<script src="jsonp.utility2._stateInit?callback=window.utility2._stateInit"></script>\n\
<script src="assets.npmtest_elasticsearch.rollup.js"></script>\n\
<script src="assets.example.js"></script>\n\
<script src="assets.test.js"></script>\n\
<!-- utility2-comment\n\
{{/if isRollup}}\n\
utility2-comment -->\n\
<div class="utility2FooterDiv">\n\
[ this app was created with\n\
<a href="https://github.com/kaizhu256/node-utility2" target="_blank">utility2</a>\n\
]\n\
</div>\n\
</body>\n\
</html>\n\
';
/* jslint-ignore-end */
Iif (local.templateRender) {
local.assetsDict['/'] = local.templateRender(
local.assetsDict['/assets.index.template.html'],
{
env: local.objectSetDefault(local.env, {
npm_package_description: 'the greatest app in the world!',
npm_package_name: 'my-app',
npm_package_nameAlias: 'my_app',
npm_package_version: '0.0.1'
})
}
);
} else {
local.assetsDict['/'] = local.assetsDict['/assets.index.template.html']
.replace((/\{\{env\.(\w+?)\}\}/g), function (match0, match1) {
// jslint-hack
String(match0);
switch (match1) {
case 'npm_package_description':
return 'the greatest app in the world!';
case 'npm_package_name':
return 'my-app';
case 'npm_package_nameAlias':
return 'my_app';
case 'npm_package_version':
return '0.0.1';
}
});
}
// run the cli
Eif (local.global.utility2_rollup || module !== require.main) {
break;
}
local.assetsDict['/assets.example.js'] =
local.assetsDict['/assets.example.js'] ||
local.fs.readFileSync(__filename, 'utf8');
local.assetsDict['/assets.npmtest_elasticsearch.rollup.js'] =
local.assetsDict['/assets.npmtest_elasticsearch.rollup.js'] ||
local.fs.readFileSync(
// buildCustomOrg-hack
local.npmtest_elasticsearch.__dirname +
'/lib.npmtest_elasticsearch.js',
'utf8'
).replace((/^#!/), '//');
local.assetsDict['/favicon.ico'] = local.assetsDict['/favicon.ico'] || '';
// if $npm_config_timeout_exit exists,
// then exit this process after $npm_config_timeout_exit ms
if (Number(process.env.npm_config_timeout_exit)) {
setTimeout(process.exit, Number(process.env.npm_config_timeout_exit));
}
// start server
if (local.global.utility2_serverHttp1) {
break;
}
process.env.PORT = process.env.PORT || '8081';
console.error('server starting on port ' + process.env.PORT);
local.http.createServer(function (request, response) {
request.urlParsed = local.url.parse(request.url);
if (local.assetsDict[request.urlParsed.pathname] !== undefined) {
response.end(local.assetsDict[request.urlParsed.pathname]);
return;
}
response.statusCode = 404;
response.end();
}).listen(process.env.PORT);
break;
}
}());
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 2 2 2 2 2 2 2 1 2 2 2 2 1 1 1 1 | /* istanbul instrument in package npmtest_elasticsearch */
/*jslint
bitwise: true,
browser: true,
maxerr: 8,
maxlen: 96,
node: true,
nomen: true,
regexp: true,
stupid: true
*/
(function () {
'use strict';
var local;
// run shared js-env code - pre-init
(function () {
// init local
local = {};
// init modeJs
local.modeJs = (function () {
try {
return typeof navigator.userAgent === 'string' &&
typeof document.querySelector('body') === 'object' &&
typeof XMLHttpRequest.prototype.open === 'function' &&
'browser';
} catch (errorCaughtBrowser) {
return module.exports &&
typeof process.versions.node === 'string' &&
typeof require('http').createServer === 'function' &&
'node';
}
}());
// init global
local.global = local.modeJs === 'browser'
? window
: global;
// init utility2_rollup
local = local.global.utility2_rollup || local;
// init lib
local.local = local.npmtest_elasticsearch = local;
// init exports
if (local.modeJs === 'browser') {
local.global.utility2_npmtest_elasticsearch = local;
} else {
module.exports = local;
module.exports.__dirname = __dirname;
module.exports.module = module;
}
}());
}());
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | 2 2 2 2 2 2 2 1 2 2 1 1 1 1 2 2 2 2 1 1 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 2 2 1 2 2 1 2 2 1 1 1 1 1 | /* istanbul instrument in package npmtest_elasticsearch */
/*jslint
bitwise: true,
browser: true,
maxerr: 8,
maxlen: 96,
node: true,
nomen: true,
regexp: true,
stupid: true
*/
(function () {
'use strict';
var local;
// run shared js-env code - pre-init
(function () {
// init local
local = {};
// init modeJs
local.modeJs = (function () {
try {
return typeof navigator.userAgent === 'string' &&
typeof document.querySelector('body') === 'object' &&
typeof XMLHttpRequest.prototype.open === 'function' &&
'browser';
} catch (errorCaughtBrowser) {
return module.exports &&
typeof process.versions.node === 'string' &&
typeof require('http').createServer === 'function' &&
'node';
}
}());
// init global
local.global = local.modeJs === 'browser'
? window
: global;
switch (local.modeJs) {
// re-init local from window.local
case 'browser':
local = local.global.utility2.objectSetDefault(
local.global.utility2_rollup || local.global.local,
local.global.utility2
);
break;
// re-init local from example.js
case 'node':
local = (local.global.utility2_rollup || require('utility2'))
.requireExampleJsFromReadme();
break;
}
// export local
local.global.local = local;
}());
// run shared js-env code - function
(function () {
return;
}());
switch (local.modeJs) {
// run browser js-env code - function
case 'browser':
break;
// run node js-env code - function
case 'node':
break;
}
// run shared js-env code - post-init
(function () {
return;
}());
switch (local.modeJs) {
// run browser js-env code - post-init
case 'browser':
// run tests
local.nop(local.modeTest &&
document.querySelector('#testRunButton1') &&
document.querySelector('#testRunButton1').click());
break;
// run node js-env code - post-init
/* istanbul ignore next */
case 'node':
local.testCase_buildApidoc_default = local.testCase_buildApidoc_default || function (
options,
onError
) {
/*
* this function will test buildApidoc's default handling-behavior-behavior
*/
options = { modulePathList: module.paths };
local.buildApidoc(options, onError);
};
local.testCase_buildApp_default = local.testCase_buildApp_default || function (
options,
onError
) {
/*
* this function will test buildApp's default handling-behavior-behavior
*/
local.testCase_buildReadme_default(options, local.onErrorThrow);
local.testCase_buildLib_default(options, local.onErrorThrow);
local.testCase_buildTest_default(options, local.onErrorThrow);
local.testCase_buildCustomOrg_default(options, local.onErrorThrow);
options = [];
local.buildApp(options, onError);
};
local.testCase_buildCustomOrg_default = local.testCase_buildCustomOrg_default ||
function (options, onError) {
/*
* this function will test buildCustomOrg's default handling-behavior
*/
options = {};
local.buildCustomOrg(options, onError);
};
local.testCase_buildLib_default = local.testCase_buildLib_default || function (
options,
onError
) {
/*
* this function will test buildLib's default handling-behavior
*/
options = {};
local.buildLib(options, onError);
};
local.testCase_buildReadme_default = local.testCase_buildReadme_default || function (
options,
onError
) {
/*
* this function will test buildReadme's default handling-behavior-behavior
*/
options = {};
local.buildReadme(options, onError);
};
local.testCase_buildTest_default = local.testCase_buildTest_default || function (
options,
onError
) {
/*
* this function will test buildTest's default handling-behavior
*/
options = {};
local.buildTest(options, onError);
};
local.testCase_webpage_default = local.testCase_webpage_default || function (
options,
onError
) {
/*
* this function will test webpage's default handling-behavior
*/
options = { modeCoverageMerge: true, url: local.serverLocalHost + '?modeTest=1' };
local.browserTest(options, onError);
};
// run test-server
local.testRunServer(local);
break;
}
}());
|
| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| elasticsearch.js | 85.71% | (6 / 7) | 100% | (0 / 0) | 0% | (0 / 1) | 85.71% | (6 / 7) |
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 1 1 1 1 1 1 | // In order to help people who were accidentally upgraded to this ES client, // throw an error when they try to instanciate the exported function. // previous "elasticsearch" module -> https://github.com/ncb000gt/node-es function es() { throw new Error('Looks like you are expecting the previous "elasticsearch" module. ' + 'It is now the "es" module. To create a client with this module use ' + '`new es.Client(params)`.'); } es.Client = require('./lib/client'); es.ConnectionPool = require('./lib/connection_pool'); es.Transport = require('./lib/transport'); es.errors = require('./lib/errors'); module.exports = es; |
| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| client.js | 22.58% | (7 / 31) | 0% | (0 / 20) | 0% | (0 / 5) | 22.58% | (7 / 31) | |
| client_action.js | 17.28% | (28 / 162) | 4.44% | (6 / 135) | 22.73% | (5 / 22) | 17.28% | (28 / 162) | |
| connection.js | 22% | (11 / 50) | 0% | (0 / 32) | 0% | (0 / 6) | 22% | (11 / 50) | |
| connection_pool.js | 14.47% | (22 / 152) | 0% | (0 / 76) | 0% | (0 / 19) | 14.47% | (22 / 152) | |
| errors.js | 37.21% | (32 / 86) | 0% | (0 / 40) | 12.5% | (2 / 16) | 39.02% | (32 / 82) | |
| host.js | 19.23% | (20 / 104) | 3.92% | (4 / 102) | 10% | (1 / 10) | 19.42% | (20 / 103) | |
| log.js | 24.39% | (20 / 82) | 1.79% | (1 / 56) | 0% | (0 / 15) | 24.69% | (20 / 81) | |
| logger.js | 33.33% | (17 / 51) | 0% | (0 / 14) | 0% | (0 / 18) | 33.33% | (17 / 51) | |
| nodes_to_host.js | 18.75% | (6 / 32) | 0% | (0 / 14) | 33.33% | (1 / 3) | 20% | (6 / 30) | |
| transport.js | 9.63% | (21 / 218) | 0% | (0 / 156) | 0% | (0 / 20) | 9.72% | (21 / 216) | |
| utils.js | 39.04% | (57 / 146) | 27.1% | (29 / 107) | 16.67% | (4 / 24) | 39.86% | (57 / 143) |
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | 1 1 1 1 1 1 1 | /**
* A client that makes requests to Elasticsearch via a {{#crossLink "Transport"}}Transport{{/crossLink}}
*
* Initializing a client might look something like:
*
* ```
* var client = new es.Client({
* hosts: [
* 'es1.net:9200',
* {
* host: 'es2.net',
* port: 9200
* }
* ],
* sniffOnStart: true,
* log: {
* type: 'file',
* level: 'warning'
* }
* });
* ```
*
* @class Client
* @constructor
*/
module.exports = Client;
var Transport = require('./transport');
var clientAction = require('./client_action');
var _ = require('./utils');
function Client(config) {
config = config || {};
if (config.__reused) {
throw new Error('Do not reuse objects to configure the elasticsearch Client class: ' +
'https://github.com/elasticsearch/elasticsearch-js/issues/33');
} else {
config.__reused = true;
}
function EsApiClient() {
// our client will log minimally by default
if (!config.hasOwnProperty('log')) {
config.log = 'warning';
}
if (!config.hosts && !config.host) {
config.host = 'http://localhost:9200';
}
this.close = function () {
this.transport.close();
};
this.transport = new Transport(config);
_.each(EsApiClient.prototype, _.bind(function (Fn, prop) {
if (Fn.prototype instanceof clientAction.ApiNamespace) {
this[prop] = new Fn(this.transport, this);
}
}, this));
delete this._namespaces;
}
EsApiClient.prototype = _.funcEnum(config, 'apiVersion', Client.apis, '_default');
if (!config.sniffEndpoint && EsApiClient.prototype === Client.apis['0.90']) {
config.sniffEndpoint = '/_cluster/nodes';
}
var Constructor = EsApiClient;
if (config.plugins) {
Constructor.prototype = _.cloneDeep(Constructor.prototype);
_.each(config.plugins, function (setup) {
Constructor = setup(Constructor, config, {
apis: require('./apis'),
connectors: require('./connectors'),
loggers: require('./loggers'),
selectors: require('./selectors'),
serializers: require('./serializers'),
Client: require('./client'),
clientAction: clientAction,
Connection: require('./connection'),
ConnectionPool: require('./connection_pool'),
Errors: require('./errors'),
Host: require('./host'),
Log: require('./log'),
Logger: require('./logger'),
NodesToHost: require('./nodes_to_host'),
Transport: require('./transport'),
utils: require('./utils')
}) || Constructor;
});
}
return new Constructor();
}
Client.apis = require('./apis');
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | 1 1 1 1 1 1 1 1 90 90 1 11 11 1784 1784 35 1784 734 1 1784 1784 11 14 11 1 1 1 1 |
var _ = require('./utils');
/**
* Constructs a client action factory that uses specific defaults
* @type {Function}
*/
exports.makeFactoryWithModifier = makeFactoryWithModifier;
/**
* Constructs a function that can be called to make a request to ES
* @type {Function}
*/
exports.factory = makeFactoryWithModifier();
/**
* Constructs a proxy to another api method
* @type {Function}
*/
exports.proxyFactory = exports.factory.proxy;
// export so that we can test this
exports._resolveUrl = resolveUrl;
exports.ApiNamespace = function () {};
exports.namespaceFactory = function () {
function ClientNamespace(transport, client) {
this.transport = transport;
this.client = client;
}
ClientNamespace.prototype = new exports.ApiNamespace();
return ClientNamespace;
};
function makeFactoryWithModifier(modifier) {
modifier = modifier || _.identity;
var factory = function (spec) {
spec = modifier(spec);
if (!_.isPlainObject(spec.params)) {
spec.params = {};
}
if (!spec.method) {
spec.method = 'GET';
}
function action(params, cb) {
if (typeof params === 'function') {
cb = params;
params = {};
} else {
params = params || {};
cb = typeof cb === 'function' ? cb : null;
}
try {
return exec(this.transport, spec, _.clone(params), cb);
} catch (e) {
if (typeof cb === 'function') {
_.nextTick(cb, e);
} else {
var def = this.transport.defer();
def.reject(e);
return def.promise;
}
}
}
action.spec = spec;
return action;
};
factory.proxy = function (fn, spec) {
return function (params, cb) {
if (typeof params === 'function') {
cb = params;
params = {};
} else {
params = params || {};
cb = typeof cb === 'function' ? cb : null;
}
if (spec.transform) {
spec.transform(params);
}
return fn.call(this, params, cb);
};
};
return factory;
}
var castType = {
'enum': function validSelection(param, val, name) {
if (_.isString(val) && val.indexOf(',') > -1) {
val = commaSepList(val);
}
if (_.isArray(val)) {
return val.map(function (v) {
return validSelection(param, v, name);
}).join(',');
}
for (var i = 0; i < param.options.length; i++) {
if (param.options[i] === String(val)) {
return param.options[i];
}
}
throw new TypeError('Invalid ' + name + ': expected ' + (
param.options.length > 1
? 'one of ' + param.options.join(',')
: param.options[0]
));
},
duration: function (param, val, name) {
if (_.isNumeric(val) || _.isInterval(val)) {
return val;
} else {
throw new TypeError(
'Invalid ' + name + ': expected a number or interval ' +
'(an integer followed by one of M, w, d, h, m, s, y or ms).'
);
}
},
list: function (param, val, name) {
switch (typeof val) {
case 'number':
case 'boolean':
return '' + val;
case 'string':
val = commaSepList(val);
/* falls through */
case 'object':
if (_.isArray(val)) {
return val.join(',');
}
/* falls through */
default:
throw new TypeError('Invalid ' + name + ': expected be a comma separated list, array, number or string.');
}
},
'boolean': function (param, val) {
val = _.isString(val) ? val.toLowerCase() : val;
return (val === 'no' || val === 'off') ? false : !!val;
},
number: function (param, val, name) {
if (_.isNumeric(val)) {
return val * 1;
} else {
throw new TypeError('Invalid ' + name + ': expected a number.');
}
},
string: function (param, val, name) {
switch (typeof val) {
case 'number':
case 'string':
return '' + val;
default:
throw new TypeError('Invalid ' + name + ': expected a string.');
}
},
time: function (param, val, name) {
if (typeof val === 'string') {
return val;
}
else if (_.isNumeric(val)) {
return '' + val;
}
else if (val instanceof Date) {
return '' + val.getTime();
}
else {
throw new TypeError('Invalid ' + name + ': expected some sort of time.');
}
}
};
function resolveUrl(url, params) {
var vars = {}, i, key;
if (url.req) {
// url has required params
if (!url.reqParamKeys) {
// create cached key list on demand
url.reqParamKeys = _.keys(url.req);
}
for (i = 0; i < url.reqParamKeys.length; i ++) {
key = url.reqParamKeys[i];
if (!params.hasOwnProperty(key) || params[key] == null) {
// missing a required param
return false;
} else {
// cast of copy required param
if (castType[url.req[key].type]) {
vars[key] = castType[url.req[key].type](url.req[key], params[key], key);
} else {
vars[key] = params[key];
}
}
}
}
if (url.opt) {
// url has optional params
if (!url.optParamKeys) {
url.optParamKeys = _.keys(url.opt);
}
for (i = 0; i < url.optParamKeys.length; i ++) {
key = url.optParamKeys[i];
if (params[key]) {
if (castType[url.opt[key].type] || params[key] == null) {
vars[key] = castType[url.opt[key].type](url.opt[key], params[key], key);
} else {
vars[key] = params[key];
}
} else {
vars[key] = url.opt[key]['default'];
}
}
}
if (!url.template) {
// compile the template on demand
url.template = _.template(url.fmt);
}
return url.template(_.transform(vars, function (note, val, name) {
// encode each value
note[name] = encodeURIComponent(val);
// remove it from the params so that it isn't sent to the final request
delete params[name];
}, {}));
}
function exec(transport, spec, params, cb) {
var request = {
method: spec.method
};
var query = {};
var i;
// pass the timeout from the spec
if (spec.requestTimeout) {
request.requestTimeout = spec.requestTimeout;
}
if (!params.body && spec.paramAsBody) {
params.body = params[spec.paramAsBody];
delete params[spec.paramAsBody];
}
// verify that we have the body if needed
if (spec.needsBody && !params.body) {
throw new TypeError('A request body is required.');
}
// control params
if (spec.bulkBody) {
request.bulkBody = true;
}
if (spec.method === 'HEAD') {
request.castExists = true;
}
// pick the url
if (spec.url) {
// only one url option
request.path = resolveUrl(spec.url, params);
} else {
for (i = 0; i < spec.urls.length; i++) {
if (request.path = resolveUrl(spec.urls[i], params)) {
break;
}
}
}
if (!request.path) {
// there must have been some mimimun requirements that were not met
var minUrl = spec.url || spec.urls[spec.urls.length - 1];
throw new TypeError('Unable to build a path with those params. Supply at least ' + _.keys(minUrl.req).join(', '));
}
// build the query string
if (!spec.paramKeys) {
// build a key list on demand
spec.paramKeys = _.keys(spec.params);
spec.requireParamKeys = _.transform(spec.params, function (req, param, key) {
if (param.required) {
req.push(key);
}
}, []);
}
for (var key in params) {
if (params.hasOwnProperty(key) && params[key] != null) {
switch (key) {
case 'body':
case 'headers':
case 'requestTimeout':
case 'maxRetries':
request[key] = params[key];
break;
case 'ignore':
request.ignore = _.isArray(params[key]) ? params[key] : [params[key]];
break;
case 'method':
request.method = _.toUpperString(params[key]);
break;
default:
var paramSpec = spec.params[key];
if (paramSpec) {
// param keys don't always match the param name, in those cases it's stored in the param def as "name"
paramSpec.name = paramSpec.name || key;
if (params[key] != null) {
if (castType[paramSpec.type]) {
query[paramSpec.name] = castType[paramSpec.type](paramSpec, params[key], key);
} else {
query[paramSpec.name] = params[key];
}
if (paramSpec['default'] && query[paramSpec.name] === paramSpec['default']) {
delete query[paramSpec.name];
}
}
} else {
query[key] = params[key];
}
}
}
}
for (i = 0; i < spec.requireParamKeys.length; i ++) {
if (!query.hasOwnProperty(spec.requireParamKeys[i])) {
throw new TypeError('Missing required parameter ' + spec.requireParamKeys[i]);
}
}
request.query = query;
return transport.request(request, cb);
}
function commaSepList(str) {
return str.split(',').map(function (i) {
return i.trim();
});
}
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | 1 1 1 1 1 1 1 1 1 1 1 | module.exports = ConnectionAbstract;
var _ = require('./utils');
var EventEmitter = require('events').EventEmitter;
var Log = require('./log');
var Host = require('./host');
var errors = require('./errors');
/**
* Abstract class used for Connection classes
* @class ConnectionAbstract
* @constructor
*/
function ConnectionAbstract(host, config) {
config = config || {};
EventEmitter.call(this);
this.log = config.log || new Log();
this.pingTimeout = config.pingTimeout || 3000;
if (!host) {
throw new TypeError('Missing host');
} else if (host instanceof Host) {
this.host = host;
} else {
throw new TypeError('Invalid host');
}
_.makeBoundMethods(this);
}
_.inherits(ConnectionAbstract, EventEmitter);
/**
* Make a request using this connection. Must be overridden by Connection classes, which can add whatever keys to
* params that they like. These are just the basics.
*
* @param [params] {Object} - The parameters for the request
* @param params.path {String} - The path for which you are requesting
* @param params.method {String} - The HTTP method for the request (GET, HEAD, etc.)
* @param params.requestTimeout {Integer} - The amount of time in milliseconds that this request should be allowed to run for.
* @param cb {Function} - A callback to be called once with `cb(err, responseBody, responseStatus)`
*/
ConnectionAbstract.prototype.request = function () {
throw new Error('Connection#request must be overwritten by the Connector');
};
ConnectionAbstract.prototype.ping = function (params, cb) {
if (typeof params === 'function') {
cb = params;
params = null;
} else {
cb = typeof cb === 'function' ? cb : null;
}
var requestTimeout = this.pingTimeout;
var requestTimeoutId;
var aborted;
var abort;
if (params && params.hasOwnProperty('requestTimeout')) {
requestTimeout = params.requestTimeout;
}
abort = this.request(_.defaults(params || {}, {
path: '/',
method: 'HEAD'
}), function (err) {
if (aborted) {
return;
}
clearTimeout(requestTimeoutId);
if (cb) {
cb(err);
}
});
if (requestTimeout) {
requestTimeoutId = setTimeout(function () {
if (abort) {
abort();
}
aborted = true;
if (cb) {
cb(new errors.RequestTimeout('Ping Timeout after ' + requestTimeout + 'ms'));
}
}, requestTimeout);
}
};
ConnectionAbstract.prototype.setStatus = function (status) {
var origStatus = this.status;
this.status = status;
this.emit('status set', status, origStatus, this);
if (status === 'closed') {
this.removeAllListeners();
}
};
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | /**
* Manager of connections to a node(s), capable of ensuring that connections are clear and living
* before providing them to the application
*
* @class ConnectionPool
* @constructor
* @param {Object} config - The config object passed to the transport.
*/
module.exports = ConnectionPool;
var _ = require('./utils');
var Log = require('./log');
function ConnectionPool(config) {
config = config || {};
_.makeBoundMethods(this);
if (!config.log) {
this.log = new Log();
config.log = this.log;
} else {
this.log = config.log;
}
// we will need this when we create connections down the road
this._config = config;
// get the selector config var
this.selector = _.funcEnum(config, 'selector', ConnectionPool.selectors, ConnectionPool.defaultSelector);
// get the connection class
this.Connection = _.funcEnum(config, 'connectionClass', ConnectionPool.connectionClasses,
ConnectionPool.defaultConnectionClass);
// time that connections will wait before being revived
this.deadTimeout = config.hasOwnProperty('deadTimeout') ? config.deadTimeout : 60000;
this.maxDeadTimeout = config.hasOwnProperty('maxDeadTimeout') ? config.maxDeadTimeout : 18e5;
this.calcDeadTimeout = _.funcEnum(config, 'calcDeadTimeout', ConnectionPool.calcDeadTimeoutOptions, 'exponential');
// a map of connections to their "id" property, used when sniffing
this.index = {};
this._conns = {
alive: [],
dead: []
};
// information about timeouts for dead connections
this._timeouts = [];
}
// selector options
ConnectionPool.selectors = require('./selectors');
ConnectionPool.defaultSelector = 'roundRobin';
// get the connection options
ConnectionPool.connectionClasses = require('./connectors');
ConnectionPool.defaultConnectionClass = ConnectionPool.connectionClasses._default;
delete ConnectionPool.connectionClasses._default;
// the function that calculates timeouts based on attempts
ConnectionPool.calcDeadTimeoutOptions = {
flat: function (attempt, baseTimeout) {
return baseTimeout;
},
exponential: function (attempt, baseTimeout) {
return Math.min(baseTimeout * 2 * Math.pow(2, (attempt * 0.5 - 1)), this.maxDeadTimeout);
}
};
/**
* Selects a connection from the list using the this.selector
* Features:
* - detects if the selector is async or not
* - sync selectors should still return asynchronously
* - catches errors in sync selectors
* - automatically selects the first dead connection when there no living connections
*
* @param {Function} cb [description]
* @return {[type]} [description]
*/
ConnectionPool.prototype.select = function (cb) {
if (this._conns.alive.length) {
if (this.selector.length > 1) {
this.selector(this._conns.alive, cb);
} else {
try {
_.nextTick(cb, void 0, this.selector(this._conns.alive));
} catch (e) {
cb(e);
}
}
} else if (this._timeouts.length) {
this._selectDeadConnection(cb);
} else {
_.nextTick(cb, void 0);
}
};
/**
* Handler for the "set status" event emitted but the connections. It will move
* the connection to it's proper connection list (unless it was closed).
*
* @param {String} status - the connection's new status
* @param {String} oldStatus - the connection's old status
* @param {ConnectionAbstract} connection - the connection object itself
*/
ConnectionPool.prototype.onStatusSet = _.handler(function (status, oldStatus, connection) {
var index;
var died = (status === 'dead');
var wasAlreadyDead = (died && oldStatus === 'dead');
var revived = (!died && oldStatus === 'dead');
var noChange = (oldStatus === status);
var from = this._conns[oldStatus];
var to = this._conns[status];
if (noChange && !died) {
return true;
}
if (from !== to) {
if (_.isArray(from)) {
index = from.indexOf(connection);
if (index !== -1) {
from.splice(index, 1);
}
}
if (_.isArray(to)) {
index = to.indexOf(connection);
if (index === -1) {
to.push(connection);
}
}
}
if (died) {
this._onConnectionDied(connection, wasAlreadyDead);
}
if (revived) {
this._onConnectionRevived(connection);
}
});
/**
* Handler used to clear the times created when a connection dies
* @param {ConnectionAbstract} connection
*/
ConnectionPool.prototype._onConnectionRevived = function (connection) {
var timeout;
for (var i = 0; i < this._timeouts.length; i++) {
if (this._timeouts[i].conn === connection) {
timeout = this._timeouts[i];
if (timeout.id) {
clearTimeout(timeout.id);
}
this._timeouts.splice(i, 1);
break;
}
}
};
/**
* Handler used to update or create a timeout for the connection which has died
* @param {ConnectionAbstract} connection
* @param {Boolean} alreadyWasDead - If the connection was preivously dead this must be set to true
*/
ConnectionPool.prototype._onConnectionDied = function (connection, alreadyWasDead) {
var timeout;
if (alreadyWasDead) {
for (var i = 0; i < this._timeouts.length; i++) {
if (this._timeouts[i].conn === connection) {
timeout = this._timeouts[i];
break;
}
}
} else {
timeout = {
conn: connection,
attempt: 0,
revive: function (cb) {
timeout.attempt++;
connection.ping(function (err) {
connection.setStatus(err ? 'dead' : 'alive');
if (cb && typeof cb === 'function') {
cb(err);
}
});
}
};
this._timeouts.push(timeout);
}
if (timeout.id) {
clearTimeout(timeout.id);
}
var ms = this.calcDeadTimeout(timeout.attempt, this.deadTimeout);
timeout.id = setTimeout(timeout.revive, ms);
timeout.runAt = _.now() + ms;
};
ConnectionPool.prototype._selectDeadConnection = function (cb) {
var orderedTimeouts = _.sortBy(this._timeouts, 'runAt');
var log = this.log;
process.nextTick(function next() {
var timeout = orderedTimeouts.shift();
if (!timeout) {
cb(void 0);
return;
}
if (!timeout.conn) {
next();
return;
}
if (timeout.conn.status === 'dead') {
timeout.revive(function (err) {
if (err) {
log.warning('Unable to revive connection: ' + timeout.conn.id);
process.nextTick(next);
} else {
cb(void 0, timeout.conn);
}
});
} else {
cb(void 0, timeout.conn);
}
});
};
/**
* Returns a random list of nodes from the living connections up to the limit.
* If there are no living connections it will fall back to the dead connections.
* If there are no dead connections it will return nothing.
*
* This is used for testing (when we just want the one existing node)
* and sniffing, where using the selector to get all of the living connections
* is not reasonable.
*
* @param {string} [status] - optional status of the connection to fetch
* @param {Number} [limit] - optional limit on the number of connections to return
*/
ConnectionPool.prototype.getConnections = function (status, limit) {
var list;
if (status) {
list = this._conns[status];
} else {
list = this._conns[this._conns.alive.length ? 'alive' : 'dead'];
}
if (limit == null) {
return list.slice(0);
} else {
return _.shuffle(list).slice(0, limit);
}
};
/**
* Add a single connection to the pool and change it's status to "alive".
* The connection should inherit from ConnectionAbstract
*
* @param {ConnectionAbstract} connection - The connection to add
*/
ConnectionPool.prototype.addConnection = function (connection) {
if (!connection.id) {
connection.id = connection.host.toString();
}
if (!this.index[connection.id]) {
this.log.info('Adding connection to', connection.id);
this.index[connection.id] = connection;
connection.on('status set', this.bound.onStatusSet);
connection.setStatus('alive');
}
};
/**
* Remove a connection from the pool, and set it's status to "closed".
*
* @param {ConnectionAbstract} connection - The connection to remove/close
*/
ConnectionPool.prototype.removeConnection = function (connection) {
if (!connection.id) {
connection.id = connection.host.toString();
}
if (this.index[connection.id]) {
delete this.index[connection.id];
connection.setStatus('closed');
connection.removeListener('status set', this.bound.onStatusSet);
}
};
/**
* Override the internal node list. All connections that are not in the new host
* list are closed and removed. Non-unique hosts are ignored.
*
* @param {Host[]} hosts - An array of Host instances.
*/
ConnectionPool.prototype.setHosts = function (hosts) {
var connection;
var i;
var id;
var host;
var toRemove = _.clone(this.index);
for (i = 0; i < hosts.length; i++) {
host = hosts[i];
id = host.toString();
if (this.index[id]) {
delete toRemove[id];
} else {
connection = new this.Connection(host, this._config);
connection.id = id;
this.addConnection(connection);
}
}
var removeIds = _.keys(toRemove);
for (i = 0; i < removeIds.length; i++) {
this.removeConnection(this.index[removeIds[i]]);
}
};
ConnectionPool.prototype.getAllHosts = function () {
return _.values(this.index).map(function (connection) {
return connection.host;
});
};
/**
* Close the conncetion pool, as well as all of it's connections
*/
ConnectionPool.prototype.close = function () {
this.setHosts([]);
};
ConnectionPool.prototype.empty = ConnectionPool.prototype.close;
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 42 42 42 42 42 42 1 42 42 124 1 | var _ = require('./utils');
var errors = module.exports;
var canCapture = (typeof Error.captureStackTrace === 'function');
var canStack = !!(new Error()).stack;
function ErrorAbstract(msg, constructor, metadata) {
this.message = msg;
Error.call(this, this.message);
if (canCapture) {
Error.captureStackTrace(this, constructor);
}
else if (canStack) {
this.stack = (new Error()).stack;
}
else {
this.stack = '';
}
if (metadata) {
_.assign(this, metadata);
this.toString = function () {
return msg + ' :: ' + JSON.stringify(metadata);
};
this.toJSON = function () {
return _.assign({
msg: msg
}, metadata);
};
}
}
errors._Abstract = ErrorAbstract;
_.inherits(ErrorAbstract, Error);
/**
* Connection Error
* @param {String} [msg] - An error message that will probably end up in a log.
*/
errors.ConnectionFault = function ConnectionFault(msg) {
ErrorAbstract.call(this, msg || 'Connection Failure', errors.ConnectionFault);
};
_.inherits(errors.ConnectionFault, ErrorAbstract);
/**
* No Living Connections
* @param {String} [msg] - An error message that will probably end up in a log.
*/
errors.NoConnections = function NoConnections(msg) {
ErrorAbstract.call(this, msg || 'No Living connections', errors.NoConnections);
};
_.inherits(errors.NoConnections, ErrorAbstract);
/**
* Generic Error
* @param {String} [msg] - An error message that will probably end up in a log.
*/
errors.Generic = function Generic(msg, metadata) {
ErrorAbstract.call(this, msg || 'Generic Error', errors.Generic, metadata);
};
_.inherits(errors.Generic, ErrorAbstract);
/**
* Request Timeout Error
* @param {String} [msg] - An error message that will probably end up in a log.
*/
errors.RequestTimeout = function RequestTimeout(msg) {
ErrorAbstract.call(this, msg || 'Request Timeout', errors.RequestTimeout);
};
_.inherits(errors.RequestTimeout, ErrorAbstract);
/**
* Request Body could not be parsed
* @param {String} [msg] - An error message that will probably end up in a log.
*/
errors.Serialization = function Serialization(msg) {
ErrorAbstract.call(this, msg || 'Unable to parse/serialize body', errors.Serialization);
};
_.inherits(errors.Serialization, ErrorAbstract);
/**
* Thrown when a browser compatability issue is detected (cough, IE, cough)
*/
errors.RequestTypeError = function RequestTypeError(feature) {
ErrorAbstract.call(this, 'Cross-domain AJAX requests ' + feature + ' are not supported', errors.RequestTypeError);
};
_.inherits(errors.RequestTypeError, ErrorAbstract);
var statusCodes = [
[300, 'Multiple Choices'],
[301, 'Moved Permanently'],
[302, 'Found'],
[303, 'See Other'],
[304, 'Not Modified'],
[305, 'Use Proxy'],
[307, 'Temporary Redirect'],
[308, 'Permanent Redirect'],
[400, 'Bad Request'],
[401, 'Authentication Exception'],
[402, 'Payment Required'],
[403, ['Authorization Exception', 'Forbidden']],
[404, 'Not Found'],
[405, 'Method Not Allowed'],
[406, 'Not Acceptable'],
[407, 'Proxy Authentication Required'],
[408, 'Request Timeout'],
[409, 'Conflict'],
[410, 'Gone'],
[411, 'Length Required'],
[412, 'Precondition Failed'],
[413, 'Request Entity Too Large'],
[414, 'Request URIToo Long'],
[415, 'Unsupported Media Type'],
[416, 'Requested Range Not Satisfiable'],
[417, 'Expectation Failed'],
[418, 'Im ATeapot'],
[421, 'Too Many Connections From This IP'],
[426, 'Upgrade Required'],
[429, 'Too Many Requests'],
[450, 'Blocked By Windows Parental Controls'],
[494, 'Request Header Too Large'],
[497, 'HTTPTo HTTPS'],
[499, 'Client Closed Request'],
[500, 'Internal Server Error'],
[501, 'Not Implemented'],
[502, 'Bad Gateway'],
[503, 'Service Unavailable'],
[504, 'Gateway Timeout'],
[505, 'HTTPVersion Not Supported'],
[506, 'Variant Also Negotiates'],
[510, 'Not Extended']
];
_.each(statusCodes, function createStatusCodeError(tuple) {
var status = tuple[0];
var names = tuple[1];
var allNames = [].concat(names, status);
var primaryName = allNames[0];
var className = _.studlyCase(primaryName);
allNames = _.uniq(allNames.concat(className));
function StatusCodeError(msg, metadata) {
this.status = status;
this.displayName = className;
var esErrObject = null;
if (_.isPlainObject(msg)) {
esErrObject = msg;
msg = null;
}
if (!esErrObject) {
// errors from es now come in two forms, an error string < 2.0 and
// an object >= 2.0
// TODO: remove after dropping support for < 2.0
ErrorAbstract.call(this, msg || primaryName, StatusCodeError, metadata);
return this;
}
msg = [].concat(esErrObject.root_cause || []).reduce(function (memo, cause) {
if (memo) memo += ' (and) ';
memo += '[' + cause.type + '] ' + cause.reason;
var extraData = _.omit(cause, ['type', 'reason']);
if (_.size(extraData)) {
memo += ', with ' + prettyPrint(extraData);
}
return memo;
}, '');
if (!msg) {
if (esErrObject.type) msg += '[' + esErrObject.type + '] ';
if (esErrObject.reason) msg += esErrObject.reason;
}
ErrorAbstract.call(this, msg || primaryName, StatusCodeError, metadata);
return this;
}
_.inherits(StatusCodeError, ErrorAbstract);
allNames.forEach(function (name) {
errors[name] = StatusCodeError;
});
});
function prettyPrint(data) {
const path = []
return (function print(v) {
if (typeof v === 'object') {
if (path.indexOf(v) > -1) return '[circular]'
path.push(v)
try {
return '{ ' + _.map(v, function (subv, name) {
return name + '=' + print(subv)
}).join(' & ') + ' }'
} finally {
path.pop()
}
} else {
return JSON.stringify(v)
}
}(data))
}
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 | /**
* Class to wrap URLS, formatting them and maintaining their separate details
* @type {[type]}
*/
module.exports = Host;
var url = require('url');
var qs = require('querystring');
var _ = require('./utils');
var startsWithProtocolRE = /^([a-z]+:)?\/\//;
var defaultProto = 'http:';
var btoa;
Iif (typeof window !== 'undefined' && typeof window.location !== 'undefined') {
defaultProto = window.location.protocol;
btoa = window.btoa;
}
btoa = btoa || function (data) {
return (new Buffer(data, 'utf8')).toString('base64');
};
var urlParseFields = [
'protocol', 'hostname', 'pathname', 'port', 'auth', 'query'
];
var simplify = ['host', 'path'];
var sslDefaults = {
pfx: null,
key: null,
passphrase: null,
cert: null,
ca: null,
ciphers: null,
rejectUnauthorized: false,
secureProtocol: null
};
// simple reference used when formatting as a url
// and defines when parsing from a string
Host.defaultPorts = {
http: 80,
https: 443
};
function Host(config, globalConfig) {
config = _.clone(config || {});
globalConfig = globalConfig || {};
// defaults
this.protocol = 'http';
this.host = 'localhost';
this.path = '';
this.port = 9200;
this.query = null;
this.headers = null;
this.suggestCompression = !!globalConfig.suggestCompression;
this.ssl = _.defaults({}, config.ssl || {}, globalConfig.ssl || {}, sslDefaults);
if (typeof config === 'string') {
var firstColon = config.indexOf(':');
var firstSlash = config.indexOf('/');
var noSlash = firstSlash === -1;
var portNoPath = firstColon > -1 && noSlash;
var portWithPath = !portNoPath && firstColon < firstSlash;
if ((noSlash || portNoPath || portWithPath) && !startsWithProtocolRE.test(config)) {
config = defaultProto + '//' + config;
}
config = _.pick(url.parse(config, false, true), urlParseFields);
// default logic for the port is to use 9200 for the default. When a string is specified though,
// we will use the default from the protocol of the string.
if (!config.port) {
var proto = config.protocol || 'http';
if (proto.charAt(proto.length - 1) === ':') {
proto = proto.substring(0, proto.length - 1);
}
if (Host.defaultPorts[proto]) {
config.port = Host.defaultPorts[proto];
}
}
}
if (_.isObject(config)) {
// move hostname/portname to host/port semi-intelligently.
_.each(simplify, function (to) {
var from = to + 'name';
if (config[from] && config[to]) {
if (config[to].indexOf(config[from]) === 0) {
config[to] = config[from];
}
} else if (config[from]) {
config[to] = config[from];
}
delete config[from];
});
} else {
config = {};
}
if (!config.auth && globalConfig.httpAuth) {
config.auth = globalConfig.httpAuth
}
if (config.auth) {
config.headers = config.headers || {};
config.headers.Authorization = 'Basic ' + btoa(config.auth);
delete config.auth;
}
_.forOwn(config, _.bind(function (val, prop) {
if (val != null) this[prop] = _.clone(val);
}, this));
// make sure the query string is parsed
if (this.query === null) {
// majority case
this.query = {};
} else if (!_.isPlainObject(this.query)) {
this.query = qs.parse(this.query);
}
// make sure that the port is a number
if (_.isNumeric(this.port)) {
this.port = parseInt(this.port, 10);
} else {
this.port = 9200;
}
// make sure the path starts with a leading slash
if (this.path === '/') {
this.path = '';
} else if (this.path && this.path.charAt(0) !== '/') {
this.path = '/' + (this.path || '');
}
// strip trailing ':' on the protocol (when config comes from url.parse)
if (this.protocol.substr(-1) === ':') {
this.protocol = this.protocol.substring(0, this.protocol.length - 1);
}
}
Host.prototype.makeUrl = function (params) {
params = params || {};
// build the port
var port = '';
if (this.port !== Host.defaultPorts[this.protocol]) {
// add an actual port
port = ':' + this.port;
}
// build the path
var path = '' + (this.path || '') + (params.path || '');
// if path doesn't start with '/' add it.
if (path.charAt(0) !== '/') {
path = '/' + path;
}
// build the query string
var query = qs.stringify(this.getQuery(params.query));
if (this.host) {
return this.protocol + '://' + this.host + port + path + (query ? '?' + query : '');
} else {
return path + (query ? '?' + query : '');
}
};
function objectPropertyGetter(prop, preOverride) {
return function (overrides) {
if (preOverride) {
overrides = preOverride.call(this, overrides);
}
var obj = this[prop];
if (!obj && !overrides) {
return null;
}
if (overrides) {
obj = _.assign({}, obj, overrides);
}
return _.size(obj) ? obj : null;
};
}
Host.prototype.getHeaders = objectPropertyGetter('headers', function (overrides) {
if (!this.suggestCompression) {
return overrides;
}
return _.defaults(overrides || {}, {
'Accept-Encoding': 'gzip,deflate'
});
});
Host.prototype.getQuery = objectPropertyGetter('query', function (query) {
return typeof query === 'string' ? qs.parse(query) : query;
});
Host.prototype.toString = function () {
return this.makeUrl();
};
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var _ = require('./utils');
var url = require('url');
var EventEmitter = require('events').EventEmitter;
/**
* Log bridge, which is an [EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)
* that sends events to one or more outputs/loggers. Setup these loggers by
* specifying their config as the first argument, or by passing it to addOutput().
*
* @class Log
* @uses Loggers.Stdio
* @constructor
* @param {object} config
* @param {string|Object|ArrayOfStrings|ArrayOfObjects} config.log - Either the level
* to setup a single logger, a full config object for a logger, or an array of
* config objects to use for creating log outputs.
* @param {string|array} config.log.level|config.log.levels - One or more keys in Log.levels (error, warning, etc.)
* @param {string} config.log.type - The name of the logger to use for this output
*/
function Log(config) {
config = config || {};
if (!config.log) return;
var i;
var outputs;
if (_.isArrayOfStrings(config.log)) {
outputs = [{
levels: config.log
}];
} else {
outputs = _.createArray(config.log, function (val) {
if (_.isPlainObject(val)) {
return val;
}
if (typeof val === 'string') {
return {
level: val
};
}
});
}
if (!outputs) {
throw new TypeError('Invalid logging output config. Expected either a log level, array of log levels, ' +
'a logger config object, or an array of logger config objects.');
}
for (i = 0; i < outputs.length; i++) {
this.addOutput(outputs[i]);
}
}
_.inherits(Log, EventEmitter);
Log.loggers = require('./loggers');
Log.prototype.close = function () {
this.emit('closing');
if (this.listenerCount()) {
console.error('Something is still listening for log events, but the logger is closing.'); // eslint-disable-line no-console
this.clearAllListeners();
}
};
Eif (EventEmitter.prototype.listenerCount) {
// If the event emitter implements it's own listenerCount method
// we don't need to (newer nodes do this).
Log.prototype.listenerCount = EventEmitter.prototype.listenerCount;
}
else if (EventEmitter.listenerCount) {
// some versions of node expose EventEmitter::listenerCount
// which is more efficient the getting all listeners of a
// specific type
Log.prototype.listenerCount = function (event) {
return EventEmitter.listenerCount(this, event);
};
}
else {
// all other versions of node expose a #listeners() method, which returns
// and array we have to count
Log.prototype.listenerCount = function (event) {
return this.listeners(event).length;
};
}
/**
* Levels observed by the loggers, ordered by rank
*
* @property levels
* @type Array
* @static
*/
Log.levels = [
/**
* Event fired for error level log entries
* @event error
* @param {Error} error - The error object to log
*/
'error',
/**
* Event fired for "warning" level log entries, which usually represent things
* like correctly formatted error responses from ES (400, ...) and recoverable
* errors (one node unresponsive)
*
* @event warning
* @param {String} message - A message to be logged
*/
'warning',
/**
* Event fired for "info" level log entries, which usually describe what a
* client is doing (sniffing etc)
*
* @event info
* @param {String} message - A message to be logged
*/
'info',
/**
* Event fired for "debug" level log entries, which will describe requests sent,
* including their url (no data, response codes, or exec times)
*
* @event debug
* @param {String} message - A message to be logged
*/
'debug',
/**
* Event fired for "trace" level log entries, which provide detailed information
* about each request made from a client, including reponse codes, execution times,
* and a full curl command that can be copied and pasted into a terminal
*
* @event trace
* @param {String} method method, , body, responseStatus, responseBody
* @param {String} url - The url the request was made to
* @param {String} body - The body of the request
* @param {Integer} responseStatus - The status code returned from the response
* @param {String} responseBody - The body of the response
*/
'trace'
];
/**
* Converts a log config value (string or array) to an array of level names which
* it represents
*
* @method parseLevels
* @static
* @private
* @param {String|ArrayOfStrings} input - Cound be a string to specify the max
* level, or an array of exact levels
* @return {Array} -
*/
Log.parseLevels = function (input) {
switch (typeof input) {
case 'string':
var i = _.indexOf(Log.levels, input);
if (i >= 0) {
return Log.levels.slice(0, i + 1);
}
/* fall through */
case 'object':
if (_.isArray(input)) {
var valid = _.intersection(input, Log.levels);
if (valid.length === input.length) {
return valid;
}
}
/* fall through */
default:
throw new TypeError('invalid logging level ' + input + '. Expected zero or more of these options: ' +
Log.levels.join(', '));
}
};
/**
* Combine the array-like param into a simple string
*
* @method join
* @static
* @private
* @param {*} arrayish - An array like object that can be itterated by _.each
* @return {String} - The final string.
*/
Log.join = function (arrayish) {
return _.map(arrayish, function (item) {
if (_.isPlainObject(item)) {
return JSON.stringify(item, null, 2) + '\n';
} else {
return item.toString();
}
}).join(' ');
};
/**
* Create a new logger, based on the config.
*
* @method addOutput
* @param {object} config - An object with config options for the logger.
* @param {String} [config.type=stdio] - The name of an output/logger. Options
* can be found in the `src/loggers` directory.
* @param {String|ArrayOfStrings} [config.level|config.levels=warning] - The levels to output
* to this logger, when an array is specified no levels other than the ones
* specified will be listened to. When a string is specified, that and all lower
* levels will be logged.
* @return {Logger}
*/
Log.prototype.addOutput = function (config) {
config = config || {};
// force "levels" key
config.levels = Log.parseLevels(config.levels || config.level || 'warning');
delete config.level;
var Logger = _.funcEnum(config, 'type', Log.loggers, process.browser ? 'console' : 'stdio');
return new Logger(this, config);
};
/**
* Log an error
*
* @method error
* @param {Error|String} error The Error to log
* @return {Boolean} - True if any outputs accepted the message
*/
Log.prototype.error = function (e) {
if (this.listenerCount('error')) {
return this.emit('error', e instanceof Error ? e : new Error(e));
}
};
/**
* Log a warning message
*
* @method warning
* @param {*} msg* - Any amount of messages that will be joined before logged
* @return {Boolean} - True if any outputs accepted the message
*/
Log.prototype.warning = function (/* ...msg */) {
if (this.listenerCount('warning')) {
return this.emit('warning', Log.join(arguments));
}
};
/**
* Log useful info about what's going on
*
* @method info
* @param {*} msg* - Any amount of messages that will be joined before logged
* @return {Boolean} - True if any outputs accepted the message
*/
Log.prototype.info = function (/* ...msg */) {
if (this.listenerCount('info')) {
return this.emit('info', Log.join(arguments));
}
};
/**
* Log a debug level message
*
* @method debug
* @param {*} msg* - Any amount of messages that will be joined before logged
* @return {Boolean} - True if any outputs accepted the message
*/
Log.prototype.debug = function (/* ...msg */) {
if (this.listenerCount('debug')) {
return this.emit('debug', Log.join(arguments));
}
};
/**
* Log a trace level message
*
* @method trace
* @param {String} method - HTTP request method
* @param {String|Object} requestUrl - URL requested. If the value is an object,
* it is expected to be the return value of Node's url.parse()
* @param {String} body - The request's body
* @param {String} responseBody - body returned from ES
* @param {String} responseStatus - HTTP status code
* @return {Boolean} - True if any outputs accepted the message
*/
Log.prototype.trace = function (method, requestUrl, body, responseBody, responseStatus) {
if (this.listenerCount('trace')) {
return this.emit('trace', Log.normalizeTraceArgs(method, requestUrl, body, responseBody, responseStatus));
}
};
Log.normalizeTraceArgs = function (method, requestUrl, body, responseBody, responseStatus) {
if (typeof requestUrl === 'string') {
requestUrl = url.parse(requestUrl, true, true);
} else {
requestUrl = _.clone(requestUrl);
if (requestUrl.path) {
requestUrl.query = url.parse(requestUrl.path, true, false).query;
}
if (!requestUrl.pathname && requestUrl.path) {
requestUrl.pathname = requestUrl.path.split('?').shift();
}
}
delete requestUrl.auth;
return {
method: method,
url: url.format(requestUrl),
body: body,
status: responseStatus,
response: responseBody
};
};
module.exports = Log;
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var _ = require('./utils');
/**
* Abstract class providing common functionality to loggers
* @param {[type]} log [description]
* @param {[type]} config [description]
*/
function LoggerAbstract(log, config) {
this.log = log;
this.listeningLevels = [];
_.makeBoundMethods(this);
// when the log closes, remove our event listeners
this.log.once('closing', this.bound.cleanUpListeners);
this.setupListeners(config.levels);
}
function padNumToTen(n) {
return n < 10 ? '0' + n.toString(10) : n.toString(10);
}
/**
* Create a timestamp string used in the format function. Defers to Log.timestamp if it is defined,
* Also, feel free to override this at the logger level.
* @return {String} - Timestamp in ISO 8601 UTC
*/
LoggerAbstract.prototype.timestamp = function () {
var d = new Date();
return d.getUTCFullYear() + '-' +
padNumToTen(d.getUTCMonth() + 1) + '-' +
padNumToTen(d.getUTCDate()) + 'T' +
padNumToTen(d.getUTCHours()) + ':' +
padNumToTen(d.getUTCMinutes()) + ':' +
padNumToTen(d.getUTCSeconds()) + 'Z';
};
function indent(text, spaces) {
var space = _.repeat(' ', spaces || 2);
return (text || '').split(/\r?\n/).map(function (line) {
return space + line;
}).join('\n');
}
LoggerAbstract.prototype.format = function (label, message) {
return label + ': ' + this.timestamp() + '\n' + indent(message) + '\n\n';
};
LoggerAbstract.prototype.write = function () {
throw new Error('This should be overwritten by the logger');
};
/**
* Clear the current event listeners and then re-listen for events based on the level specified
*
* @method setupListeners
* @private
* @param {Integer} level - The max log level that this logger should listen to
* @return {undefined}
*/
LoggerAbstract.prototype.setupListeners = function (levels) {
this.cleanUpListeners();
this.listeningLevels = [];
_.each(levels, _.bind(function (level) {
var fnName = 'on' + _.ucfirst(level);
if (this.bound[fnName]) {
this.listeningLevels.push(level);
this.log.on(level, this.bound[fnName]);
} else {
throw new Error('Unable to listen for level "' + level + '"');
}
}, this));
};
/**
* Clear the current event listeners
*
* @method cleanUpListeners
* @private
* @return {undefined}
*/
LoggerAbstract.prototype.cleanUpListeners = _.handler(function () {
_.each(this.listeningLevels, _.bind(function (level) {
this.log.removeListener(level, this.bound['on' + _.ucfirst(level)]);
}, this));
});
/**
* Handler for the logs "error" event
*
* @method onError
* @private
* @param {Error} e - The Error object to log
* @return {undefined}
*/
LoggerAbstract.prototype.onError = _.handler(function (e) {
this.write((e.name === 'Error' ? 'ERROR' : e.name), e.stack);
});
/**
* Handler for the logs "warning" event
*
* @method onWarning
* @private
* @param {String} msg - The message to be logged
* @return {undefined}
*/
LoggerAbstract.prototype.onWarning = _.handler(function (msg) {
this.write('WARNING', msg);
});
/**
* Handler for the logs "info" event
*
* @method onInfo
* @private
* @param {String} msg - The message to be logged
* @return {undefined}
*/
LoggerAbstract.prototype.onInfo = _.handler(function (msg) {
this.write('INFO', msg);
});
/**
* Handler for the logs "debug" event
*
* @method onDebug
* @private
* @param {String} msg - The message to be logged
* @return {undefined}
*/
LoggerAbstract.prototype.onDebug = _.handler(function (msg) {
this.write('DEBUG', msg);
});
/**
* Handler for the logs "trace" event
*
* @method onTrace
* @private
* @param {String} msg - The message to be logged
* @return {undefined}
*/
LoggerAbstract.prototype.onTrace = _.handler(function (requestDetails) {
this.write('TRACE', this._formatTraceMessage(requestDetails));
});
LoggerAbstract.prototype._formatTraceMessage = function (req) {
return '-> ' + req.method + ' ' + req.url + '\n' +
this._prettyJson(req.body) + '\n' +
'<- ' + req.status + '\n' +
this._prettyJson(req.response);
/*
-> GET https://sldfkjsdlfksjdf:9200/slsdkfjlxckvxhclks?sdlkj=sdlfkje
{
asdflksjdf
}
<- 502
{
sldfksjdlf
}
*/
};
LoggerAbstract.prototype._prettyJson = function (body) {
try {
if (typeof body === 'string') {
body = JSON.parse(body);
}
return JSON.stringify(body, null, ' ').replace(/'/g, '\\u0027');
} catch (e) {
return typeof body === 'string' ? body : '';
}
};
module.exports = LoggerAbstract;
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | 1 1 1 2 1 1 | var _ = require('./utils');
var extractHostPartsRE1x = /\[\/*([^:]+):(\d+)\]/;
function makeNodeParser(hostProp) {
return function (nodes) {
return _.transform(nodes, function (hosts, node, id) {
var address = node[hostProp]
if (!address) return;
var host = {
host: undefined,
port: undefined,
_meta: {
id: id,
name: node.name,
hostname: node.hostname,
version: node.version
}
};
var malformedError = new Error(
'Malformed ' + hostProp + '.' +
' Got ' + JSON.stringify(node[hostProp]) +
' and expected it to match "{hostname?}/{ip}:{port}".'
);
var matches1x = extractHostPartsRE1x.exec(address);
if (matches1x) {
host.host = matches1x[1];
host.port = parseInt(matches1x[2], 10);
hosts.push(host);
return;
}
if (address.indexOf('/') > -1) {
var withHostParts = address.split('/');
if (withHostParts.length !== 2) throw malformedError;
host.host = withHostParts.shift();
address = withHostParts.shift();
}
if (address.indexOf(':') < 0) {
throw malformedError;
}
var addressParts = address.split(':');
if (addressParts.length !== 2) {
throw malformedError;
}
host.host = host.host || addressParts[0];
host.port = parseInt(addressParts[1], 10);
hosts.push(host);
}, []);
};
}
module.exports = makeNodeParser('http_address');
module.exports.thrift = makeNodeParser('transport_address');
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | /**
* Class that manages making request, called by all of the API methods.
* @type {[type]}
*/
module.exports = Transport;
var _ = require('./utils');
var errors = require('./errors');
var Host = require('./host');
var Promise = require('promise/lib/es6-extensions');
var patchSniffOnConnectionFault = require('./transport/sniff_on_connection_fault');
var findCommonProtocol = require('./transport/find_common_protocol');
function Transport(config) {
var self = this;
config = self._config = config || {};
var LogClass = (typeof config.log === 'function') ? config.log : require('./log');
config.log = self.log = new LogClass(config);
// setup the connection pool
var ConnectionPool = _.funcEnum(config, 'connectionPool', Transport.connectionPools, 'main');
self.connectionPool = new ConnectionPool(config);
// setup the serializer
var Serializer = _.funcEnum(config, 'serializer', Transport.serializers, 'json');
self.serializer = new Serializer(config);
// setup the nodesToHostCallback
self.nodesToHostCallback = _.funcEnum(config, 'nodesToHostCallback', Transport.nodesToHostCallbacks, 'main');
// setup max retries
self.maxRetries = config.hasOwnProperty('maxRetries') ? config.maxRetries : 3;
// setup endpoint to use for sniffing
self.sniffEndpoint = config.hasOwnProperty('sniffEndpoint') ? config.sniffEndpoint : '/_nodes/_all/clear';
// setup requestTimeout default
self.requestTimeout = config.hasOwnProperty('requestTimeout') ? config.requestTimeout : 30000;
if (config.hasOwnProperty('defer')) {
self.defer = config.defer;
}
// randomizeHosts option
var randomizeHosts = config.hasOwnProperty('randomizeHosts') ? !!config.randomizeHosts : true;
if (config.host) {
config.hosts = config.host;
}
if (config.hosts) {
var hostsConfig = _.createArray(config.hosts, function (val) {
if (_.isPlainObject(val) || _.isString(val) || val instanceof Host) {
return val;
}
});
if (!hostsConfig) {
throw new TypeError('Invalid hosts config. Expected a URL, an array of urls, a host config object, ' +
'or an array of host config objects.');
}
if (randomizeHosts) {
hostsConfig = _.shuffle(hostsConfig);
}
self.setHosts(hostsConfig);
}
if (config.hasOwnProperty('sniffedNodesProtocol')) {
self.sniffedNodesProtocol = config.sniffedNodesProtocol || null;
} else {
self.sniffedNodesProtocol = findCommonProtocol(self.connectionPool.getAllHosts()) || null;
}
if (config.sniffOnStart) {
self.sniff();
}
if (config.sniffInterval) {
self._timeout(function doSniff() {
self.sniff();
self._timeout(doSniff, config.sniffInterval);
}, config.sniffInterval);
}
if (config.sniffOnConnectionFault) {
patchSniffOnConnectionFault(self);
}
}
Transport.connectionPools = {
main: require('./connection_pool')
};
Transport.serializers = require('./serializers');
Transport.nodesToHostCallbacks = {
main: require('./nodes_to_host')
};
Transport.prototype.defer = function () {
var defer = {};
defer.promise = new Promise(function (resolve, reject) {
defer.resolve = resolve;
defer.reject = reject;
});
return defer;
};
/**
* Perform a request with the client's transport
*
* @method request
* @todo async body writing
* @todo abort
* @todo access to custom headers, modifying of request in general
* @param {object} params
* @param {Number} params.requestTimeout - timeout for the entire request (inculding all retries)
* @param {Number} params.maxRetries - number of times to re-run request if the
* original node chosen can not be connected to.
* @param {string} [params.path="/"] - URL pathname. Do not include query string.
* @param {string|object} [params.query] - Query string.
* @param {String} params.method - The HTTP method for the request
* @param {String} params.body - The body of the HTTP request
* @param {Function} cb - A function to call back with (error, responseBody, responseStatus)
*/
Transport.prototype.request = function (params, cb) {
var self = this;
var remainingRetries = this.maxRetries;
var requestTimeout = this.requestTimeout;
var connection; // set in sendReqWithConnection
var aborted = false; // several connector will respond with an error when the request is aborted
var requestAborter; // an abort function, returned by connection#request()
var requestTimeoutId; // the id of the ^timeout
var ret; // the object returned to the user, might be a promise
var defer; // the defer object, will be set when we are using promises.
var body = params.body;
var headers = !params.headers ? {} : _.transform(params.headers, function (headers, val, name) {
headers[String(name).toLowerCase()] = val;
});
self.log.debug('starting request', params);
// determine the response based on the presense of a callback
if (typeof cb === 'function') {
// handle callbacks within a domain
if (process.domain) {
cb = process.domain.bind(cb);
}
ret = {
abort: abortRequest
};
} else {
defer = this.defer();
ret = defer.promise;
ret.abort = abortRequest;
}
if (body && params.method === 'GET') {
_.nextTick(respond, new TypeError('Body can not be sent with method "GET"'));
return ret;
}
// serialize the body
if (body) {
var serializer = self.serializer;
var serializeFn = serializer[params.bulkBody ? 'bulkBody' : 'serialize'];
body = serializeFn.call(serializer, body);
if (!headers['content-type']) {
headers['content-type'] = serializeFn.contentType;
}
}
if (params.hasOwnProperty('maxRetries')) {
remainingRetries = params.maxRetries;
}
if (params.hasOwnProperty('requestTimeout')) {
requestTimeout = params.requestTimeout;
}
params.req = {
method: params.method,
path: params.path || '/',
query: params.query,
body: body,
headers: headers
};
function sendReqWithConnection(err, _connection) {
if (aborted) {
return;
}
if (err) {
respond(err);
} else if (_connection) {
connection = _connection;
requestAborter = connection.request(params.req, checkRespForFailure);
} else {
self.log.warning('No living connections');
respond(new errors.NoConnections());
}
}
function checkRespForFailure(err, body, status, headers) {
if (aborted) {
return;
}
requestAborter = void 0;
if (err instanceof errors.RequestTypeError) {
self.log.error('Connection refused to execute the request', err);
respond(err, body, status, headers);
return;
}
if (err) {
connection.setStatus('dead');
var errMsg = err.message || '';
errMsg =
'\n' +
params.req.method +
' ' +
connection.host.makeUrl(params.req) +
(errMsg.length ? ' => ' : '') +
errMsg
;
if (remainingRetries) {
remainingRetries--;
self.log.error('Request error, retrying' + errMsg);
self.connectionPool.select(sendReqWithConnection);
} else {
self.log.error('Request complete with error' + errMsg);
respond(new errors.ConnectionFault(err));
}
} else {
self.log.debug('Request complete');
respond(void 0, body, status, headers);
}
}
function respond(err, body, status, headers) {
if (aborted) {
return;
}
self._timeout(requestTimeoutId);
var parsedBody;
var isJson = !headers || (headers['content-type'] && ~headers['content-type'].indexOf('application/json'));
if (!err && body) {
if (isJson) {
parsedBody = self.serializer.deserialize(body);
if (parsedBody == null) {
err = new errors.Serialization();
parsedBody = body;
}
} else {
parsedBody = body;
}
}
// does the response represent an error?
if (
(!err || err instanceof errors.Serialization)
&& (status < 200 || status >= 300)
&& (!params.ignore || !_.includes(params.ignore, status))
) {
var errorMetadata = _.pick(params.req, ['path', 'query', 'body']);
errorMetadata.statusCode = status;
errorMetadata.response = body;
if (status === 401 && headers && headers['www-authenticate']) {
errorMetadata.wwwAuthenticateDirective = headers['www-authenticate'];
}
if (errors[status]) {
err = new errors[status](parsedBody && parsedBody.error, errorMetadata);
} else {
err = new errors.Generic('unknown error', errorMetadata);
}
}
// can we cast notfound to false?
if (params.castExists) {
if (err && err instanceof errors.NotFound) {
parsedBody = false;
err = void 0;
} else {
parsedBody = !err;
}
}
// how do we send the response?
if (typeof cb === 'function') {
if (err) {
cb(err, parsedBody, status);
} else {
cb(void 0, parsedBody, status);
}
} else if (err) {
err.body = parsedBody;
err.status = status;
defer.reject(err);
} else {
defer.resolve(parsedBody);
}
}
function abortRequest() {
if (aborted) {
return;
}
aborted = true;
remainingRetries = 0;
self._timeout(requestTimeoutId);
if (typeof requestAborter === 'function') {
requestAborter();
}
}
if (requestTimeout && requestTimeout !== Infinity) {
requestTimeoutId = this._timeout(function () {
respond(new errors.RequestTimeout('Request Timeout after ' + requestTimeout + 'ms'));
abortRequest();
}, requestTimeout);
}
if (connection) {
sendReqWithConnection(void 0, connection);
} else {
self.connectionPool.select(sendReqWithConnection);
}
return ret;
};
Transport.prototype._timeout = function (cb, delay) {
if (this.closed) return;
var id;
var timers = this._timers || (this._timers = []);
if ('function' !== typeof cb) {
id = cb;
cb = void 0;
}
if (cb) {
// set the timer
id = setTimeout(function () {
_.pull(timers, id);
cb();
}, delay);
timers.push(id);
return id;
}
if (id) {
clearTimeout(id);
var i = this._timers.indexOf(id);
if (i !== -1) {
this._timers.splice(i, 1);
}
}
};
/**
* Ask an ES node for a list of all the nodes, add/remove nodes from the connection
* pool as appropriate
*
* @param {Function} cb - Function to call back once complete
*/
Transport.prototype.sniff = function (cb) {
var self = this;
var nodesToHostCallback = this.nodesToHostCallback;
var log = this.log;
var sniffedNodesProtocol = this.sniffedNodesProtocol;
// make cb a function if it isn't
cb = typeof cb === 'function' ? cb : _.noop;
this.request({
path: this.sniffEndpoint,
method: 'GET'
}, function (err, resp, status) {
if (!err && resp && resp.nodes) {
var hostsConfigs;
try {
hostsConfigs = nodesToHostCallback(resp.nodes);
} catch (e) {
log.error(new Error('Unable to convert node list from ' + this.sniffEndpoint +
' to hosts durring sniff. Encountered error:\n' + (e.stack || e.message)));
return;
}
_.forEach(hostsConfigs, function (hostConfig) {
if (sniffedNodesProtocol) hostConfig.protocol = sniffedNodesProtocol;
});
self.setHosts(hostsConfigs);
}
cb(err, resp, status);
});
};
/**
* Set the host list that the transport should use.
*
* @param {Array<HostConfig>} hostsConfigs - an array of Hosts, or configuration objects
* that will be used to create Host objects.
*/
Transport.prototype.setHosts = function (hostsConfigs) {
var globalConfig = this._config;
this.connectionPool.setHosts(_.map(hostsConfigs, function (conf) {
return (conf instanceof Host) ? conf : new Host(conf, globalConfig);
}));
};
/**
* Close the Transport, which closes the logs and connection pool
* @return {[type]} [description]
*/
Transport.prototype.close = function () {
this.log.close();
this.closed = true;
_.each(this._timers, clearTimeout);
this._timers = null;
this.connectionPool.close();
};
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 | 1 1 1 1 1 1 7 7 1 1 3 42 42 42 42 42 733 733 733 733 733 181 78 181 733 672 552 120 120 42 42 42 42 1 1 1 1 1 1 1 1 1 1 1 1 16 16 1 1 1 1 1 1 1 1 1 1 | var path = require('path');
var nodeUtils = require('util');
/**
* Custom utils library, basically a modified version of [lodash](http://lodash.com/docs) +
* [node.utils](http://nodejs.org/api/util.html#util_util) that doesn't use mixins to prevent
* confusion when requiring lodash itself.
*
* @class utils
* @static
*/
var _ = require('lodash').assign({}, require('lodash'), nodeUtils);
/**
* Link to [path.join](http://nodejs.org/api/path.html#path_path_join_path1_path2)
*
* @method _.joinPath
* @type {function}
*/
_.joinPath = path.join;
/**
* Recursively merge two objects, walking into each object and concating arrays. If both to and from have a value at a
* key, but the values' types don't match to's value is left unmodified. Only Array and Object values are merged - that
* it to say values with a typeof "object"
*
* @param {Object} to - Object to merge into (no cloning, the original object
* is modified)
* @param {Object} from - Object to pull changed from
* @return {Object} - returns the modified to value
*/
_.deepMerge = function (to, from) {
_.each(from, function (fromVal, key) {
switch (typeof to[key]) {
case 'undefined':
to[key] = from[key];
break;
case 'object':
if (_.isArray(to[key]) && _.isArray(from[key])) {
to[key] = to[key].concat(from[key]);
}
else if (_.isPlainObject(to[key]) && _.isPlainObject(from[key])) {
_.deepMerge(to[key], from[key]);
}
}
});
return to;
};
/**
* Test if a value is an array and it's contents are of a specific type
*
* @method isArrayOf<Strings|Object|Array|Finite|Function|RegExp>s
* @param {Array} arr - An array to check
* @return {Boolean}
*/
_.each([
'String',
'Object',
'PlainObject',
'Array',
'Finite',
'Function',
'RegExp'
], function (type) {
var check = _['is' + type];
_['isArrayOf' + type + 's'] = function (arr) {
// quick shallow check of arrays
return _.isArray(arr) && _.every(arr.slice(0, 10), check);
};
});
/**
* Capitalize the first letter of a word
*
* @method ucfirst
* @param {string} word - The word to transform
* @return {string}
*/
_.ucfirst = function (word) {
return word[0].toUpperCase() + word.substring(1).toLowerCase();
};
/**
* Base algo for studlyCase and camelCase
* @param {boolean} firstWordCap - Should the first character of the first word be capitalized
* @return {Function}
*/
function adjustWordCase(firstWordCap, otherWordsCap, sep) {
return function (string) {
var i = 0;
var words = [];
var word = '';
var code, c, upper, lower;
for (; i < string.length; i++) {
code = string.charCodeAt(i);
c = string.charAt(i);
lower = (code >= 97 && code <= 122) || (code >= 48 && code <= 57);
upper = code >= 65 && code <= 90;
if (upper || !lower) {
// new word
if (word.length) {
words.push(word);
}
word = '';
}
if (upper || lower) {
if (lower && word.length) {
word += c;
} else {
Eif ((!words.length && firstWordCap) || (words.length && otherWordsCap)) {
word = c.toUpperCase();
}
else {
word = c.toLowerCase();
}
}
}
}
Eif (word.length) {
words.push(word);
}
// add the leading underscore back to strings the had it originally
Iif (words.length && string.charAt(0) === '_') {
words[0] = '_' + words[0];
}
return words.join(sep);
};
}
/**
* Transform a string into StudlyCase
*
* @method studlyCase
* @param {String} string
* @return {String}
*/
_.studlyCase = adjustWordCase(true, true, '');
/**
* Transform a string into camelCase
*
* @method camelCase
* @param {String} string
* @return {String}
*/
_.camelCase = adjustWordCase(false, true, '');
/**
* Transform a string into snakeCase
*
* @method snakeCase
* @param {String} string
* @return {String}
*/
_.snakeCase = adjustWordCase(false, false, '_');
/**
* Lower-case a string, and return an empty string if any is not a string
*
* @param any {*} - Something or nothing
* @returns {string}
*/
_.toLowerString = function (any) {
if (any) {
if (typeof any !== 'string') {
any = any.toString();
}
} else {
any = '';
}
return any.toLowerCase();
};
/**
* Upper-case the string, return an empty string if any is not a string
*
* @param any {*} - Something or nothing
* @returns {string}
*/
_.toUpperString = function (any) {
if (any) {
if (typeof any !== 'string') {
any = any.toString();
}
} else {
any = '';
}
return any.toUpperCase();
};
/**
* Test if a value is "numeric" meaning that it can be transformed into something besides NaN
*
* @method isNumeric
* @param {*} val
* @return {Boolean}
*/
_.isNumeric = function (val) {
return typeof val !== 'object' && val - parseFloat(val) >= 0;
};
// regexp to test for intervals
var intervalRE = /^(\d+(?:\.\d+)?)(M|w|d|h|m|s|y|ms)$/;
/**
* Test if a string represents an interval (eg. 1m, 2Y)
*
* @method isInterval
* @param {String} val
* @return {Boolean}
*/
_.isInterval = function (val) {
return !!(val.match && val.match(intervalRE));
};
/**
* Repeat a string n times
*
* @todo TestPerformance
* @method repeat
* @param {String} what - The string to repeat
* @param {Number} times - Times the string should be repeated
* @return {String}
*/
_.repeat = function (what, times) {
return (new Array(times + 1)).join(what);
};
/**
* Call a function, applying the arguments object to it in an optimized way, rather than always turning it into an array
*
* @param func {Function} - The function to execute
* @param context {*} - The context the function will be executed with
* @param args {Arguments} - The arguments to send to func
* @param [sliceIndex=0] {Integer} - The index that args should be sliced at, before feeding args to func
* @returns {*} - the return value of func
*/
_.applyArgs = function (func, context, args, sliceIndex) {
sliceIndex = sliceIndex || 0;
switch (args.length - sliceIndex) {
case 0:
return func.call(context);
case 1:
return func.call(context, args[0 + sliceIndex]);
case 2:
return func.call(context, args[0 + sliceIndex], args[1 + sliceIndex]);
case 3:
return func.call(context, args[0 + sliceIndex], args[1 + sliceIndex], args[2 + sliceIndex]);
case 4:
return func.call(context, args[0 + sliceIndex], args[1 + sliceIndex], args[2 + sliceIndex], args[3 + sliceIndex]);
case 5:
return func.call(context, args[0 + sliceIndex], args[1 + sliceIndex],
args[2 + sliceIndex], args[3 + sliceIndex], args[4 + sliceIndex]);
default:
return func.apply(context, Array.prototype.slice.call(args, sliceIndex));
}
};
/**
* Schedule a function to be called on the next tick, and supply it with these arguments
* when it is called.
* @return {[type]} [description]
*/
_.nextTick = function (cb) {
// bind the function and schedule it
process.nextTick(_.bindKey(_, 'applyArgs', cb, null, arguments, 1));
};
/**
* Marks a method as a handler. Currently this just makes a property on the method
* flagging it to be bound to the object at object creation when "makeBoundMethods" is called
*
* ```
* ClassName.prototype.methodName = _.handler(function () {
* // this will always be bound when called via classInstance.bound.methodName
* this === classInstance
* });
* ```
*
* @alias _.scheduled
* @param {Function} func - The method that is being defined
* @return {Function}
*/
_.handler = function (func) {
func._provideBound = true;
return func;
};
_.scheduled = _.handler;
/**
* Creates an "bound" property on an object, which all or a subset of methods from
* the object which are bound to the original object.
*
* ```
* var obj = {
* onEvent: function () {}
* };
*
* _.makeBoundMethods(obj);
*
* obj.bound.onEvent() // is bound to obj, and can safely be used as an event handler.
* ```
*
* @param {Object} obj - The object to bind the methods to
*/
_.makeBoundMethods = function (obj) {
obj.bound = {};
for (var prop in obj) {
// dearest maintainer, we want to look through the prototype
if (typeof obj[prop] === 'function' && obj[prop]._provideBound === true) {
obj.bound[prop] = _.bind(obj[prop], obj);
}
}
};
_.noop = function () {};
/**
* Implements the standard "string or constructor" check that I was copy/pasting everywhere
* @param {String|Function} val - the value that the user passed in
* @param {Object} opts - a map of the options
* @return {Function|undefined} - If a valid option was specified, then the constructor is returned
*/
_.funcEnum = function (config, name, opts, def) {
var val = config[name];
switch (typeof val) {
case 'undefined':
return opts[def];
case 'function':
return val;
case 'string':
if (opts.hasOwnProperty(val)) {
return opts[val];
}
/* falls through */
default:
var err = 'Invalid ' + name + ' "' + val + '", expected a function';
switch (_.size(opts)) {
case 0:
break;
case 1:
err += ' or ' + _.keys(opts)[0];
break;
default:
err += ' or one of ' + _.keys(opts).join(', ');
break;
}
throw new TypeError(err);
}
};
/**
* Accepts any object and attempts to convert it into an array. If the object passed in is not
* an array it will be wrapped in one. Then the transform/map function will be called for each element
* and create a new array that is returned. If the map function fails to return something, the loop is
* halted and false is returned instead of an array.
*
* @param {*} input - The value to convert
* @param {Function} transform - A function called for each element of the resulting array
* @return {Array|false} - an array on success, or false on failure.
*/
_.createArray = function (input, transform) {
transform = typeof transform === 'function' ? transform : _.identity;
var output = [];
var item;
var i;
if (!_.isArray(input)) {
input = [input];
}
for (i = 0; i < input.length; i++) {
item = transform(input[i]);
if (item === void 0) {
return false;
} else {
output.push(item);
}
}
return output;
};
/**
* Takes a WritableStream, and returns the chunks that have not successfully written, returning them as a string.
*
* ONLY WORKS FOR TEXT STREAMS
*
* @param {WritableStream} stream - an instance of stream.Writable
* @return {string} - the remaining test to be written to the stream
*/
_.getUnwrittenFromStream = function (stream) {
var writeBuffer = _.getStreamWriteBuffer(stream);
if (!writeBuffer) return;
// flush the write buffer
var out = '';
if (!writeBuffer.length) return out;
_.each(writeBuffer, function (writeReq) {
if (writeReq.chunk) {
// 0.9.12+ uses WriteReq objects with a chunk prop
out += '' + writeReq.chunk;
} else if (_.isArray(writeReq) && (typeof writeReq[0] === 'string' || Buffer.isBuffer(writeReq[0]))) {
// 0.9.4 - 0.9.9 buffers are arrays of arrays like [[chunk, cb], [chunk, undef], ...].
out += '' + writeReq[0];
} else {
return false;
}
});
return out;
};
_.getStreamWriteBuffer = function (stream) {
if (!stream || !stream._writableState) return;
var writeState = stream._writableState;
if (writeState.getBuffer) {
return writeState.getBuffer();
} else if (writeState.buffer) {
return writeState.buffer;
}
};
_.clearWriteStreamBuffer = function (stream) {
var buffer = _.getStreamWriteBuffer(stream);
return buffer && buffer.splice(0);
};
/**
* return the current time in milliseconds since epoch
*/
_.now = function () {
return (typeof Date.now === 'function') ? Date.now() : (new Date()).getTime();
};
module.exports = _;
|
| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| 0_90.js | 98.61% | (71 / 72) | 100% | (0 / 0) | 0% | (0 / 1) | 98.61% | (71 / 72) | |
| 1_0.js | 99.01% | (100 / 101) | 100% | (0 / 0) | 0% | (0 / 1) | 99.01% | (100 / 101) | |
| 1_1.js | 99.05% | (104 / 105) | 100% | (0 / 0) | 0% | (0 / 1) | 99.05% | (104 / 105) | |
| 1_2.js | 99.05% | (104 / 105) | 100% | (0 / 0) | 0% | (0 / 1) | 99.05% | (104 / 105) | |
| 1_3.js | 99.11% | (111 / 112) | 100% | (0 / 0) | 0% | (0 / 1) | 99.11% | (111 / 112) | |
| 1_4.js | 99.15% | (116 / 117) | 100% | (0 / 0) | 0% | (0 / 1) | 99.15% | (116 / 117) | |
| 1_5.js | 99.15% | (116 / 117) | 100% | (0 / 0) | 0% | (0 / 1) | 99.15% | (116 / 117) | |
| 1_6.js | 99.17% | (119 / 120) | 100% | (0 / 0) | 50% | (1 / 2) | 99.17% | (119 / 120) | |
| 1_7.js | 99.17% | (119 / 120) | 100% | (0 / 0) | 50% | (1 / 2) | 99.17% | (119 / 120) | |
| 2_0.js | 99.15% | (117 / 118) | 100% | (0 / 0) | 50% | (1 / 2) | 99.15% | (117 / 118) | |
| 2_1.js | 99.17% | (120 / 121) | 100% | (0 / 0) | 50% | (1 / 2) | 99.17% | (120 / 121) | |
| 2_2.js | 99.17% | (120 / 121) | 100% | (0 / 0) | 50% | (1 / 2) | 99.17% | (120 / 121) | |
| 2_3.js | 99.21% | (125 / 126) | 100% | (0 / 0) | 50% | (1 / 2) | 99.21% | (125 / 126) | |
| 2_4.js | 99.21% | (126 / 127) | 100% | (0 / 0) | 50% | (1 / 2) | 99.21% | (126 / 127) | |
| 5_0.js | 100% | (132 / 132) | 100% | (0 / 0) | 100% | (1 / 1) | 100% | (132 / 132) | |
| 5_x.js | 100% | (133 / 133) | 100% | (0 / 0) | 100% | (1 / 1) | 100% | (133 / 133) | |
| index.js | 100% | (1 / 1) | 100% | (0 / 0) | 100% | (0 / 0) | 100% | (1 / 1) | |
| master.js | 100% | (133 / 133) | 100% | (0 / 0) | 100% | (1 / 1) | 100% | (133 / 133) |
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').factory;
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cluster', 'indices'];
/**
* Perform a [bulk](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Explicitely set the replication type
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
type: {
type: 'string'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [clearScroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
url: {
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.cluster.prototype.getSettings = ca({
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.nodeHotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.nodeHotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [cluster.nodeInfo](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.all - Return all available information
* @param {<<api-param-type-boolean,`Boolean`>>} params.clear - Reset the default settings
* @param {<<api-param-type-boolean,`Boolean`>>} params.http - Return information about HTTP
* @param {<<api-param-type-boolean,`Boolean`>>} params.jvm - Return information about the JVM
* @param {<<api-param-type-boolean,`Boolean`>>} params.network - Return information about network
* @param {<<api-param-type-boolean,`Boolean`>>} params.os - Return information about the operating system
* @param {<<api-param-type-boolean,`Boolean`>>} params.plugin - Return information about plugins
* @param {<<api-param-type-boolean,`Boolean`>>} params.process - Return information about the Elasticsearch process
* @param {<<api-param-type-boolean,`Boolean`>>} params.settings - Return information about node settings
* @param {<<api-param-type-boolean,`Boolean`>>} params.threadPool - Return information about the thread pool
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.transport - Return information about transport
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.nodeInfo = ca({
params: {
all: {
type: 'boolean'
},
clear: {
type: 'boolean'
},
http: {
type: 'boolean'
},
jvm: {
type: 'boolean'
},
network: {
type: 'boolean'
},
os: {
type: 'boolean'
},
plugin: {
type: 'boolean'
},
process: {
type: 'boolean'
},
settings: {
type: 'boolean'
},
threadPool: {
type: 'boolean',
name: 'thread_pool'
},
timeout: {
type: 'time'
},
transport: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [cluster.nodeShutdown](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/cluster-nodes-shutdown.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.delay - Set the delay for the operation (default: 1s)
* @param {<<api-param-type-boolean,`Boolean`>>} params.exit - Exit the JVM as well (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes
*/
api.cluster.prototype.nodeShutdown = ca({
params: {
delay: {
type: 'time'
},
exit: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_shutdown'
}
],
method: 'POST'
});
/**
* Perform a [cluster.nodeStats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.all - Return all available information
* @param {<<api-param-type-boolean,`Boolean`>>} params.clear - Reset the default level of detail
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return detailed information for, when returning the `indices` metric family (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.fs - Return information about the filesystem
* @param {<<api-param-type-boolean,`Boolean`>>} params.http - Return information about HTTP
* @param {<<api-param-type-boolean,`Boolean`>>} params.indices - Return information about indices
* @param {<<api-param-type-boolean,`Boolean`>>} params.jvm - Return information about the JVM
* @param {<<api-param-type-boolean,`Boolean`>>} params.network - Return information about network
* @param {<<api-param-type-boolean,`Boolean`>>} params.os - Return information about the operating system
* @param {<<api-param-type-boolean,`Boolean`>>} params.process - Return information about the Elasticsearch process
* @param {<<api-param-type-boolean,`Boolean`>>} params.threadPool - Return information about the thread pool
* @param {<<api-param-type-boolean,`Boolean`>>} params.transport - Return information about transport
* @param {<<api-param-type-string,`String`>>} params.metricFamily - Limit the information returned to a certain metric family
* @param {<<api-param-type-string,`String`>>} params.metric - Limit the information returned for `indices` family to a specific metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.nodeStats = ca({
params: {
all: {
type: 'boolean'
},
clear: {
type: 'boolean'
},
fields: {
type: 'list'
},
fs: {
type: 'boolean'
},
http: {
type: 'boolean'
},
indices: {
type: 'boolean'
},
jvm: {
type: 'boolean'
},
network: {
type: 'boolean'
},
os: {
type: 'boolean'
},
process: {
type: 'boolean'
},
threadPool: {
type: 'boolean',
name: 'thread_pool'
},
transport: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.cluster.prototype.putSettings = ca({
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterMetadata - Don't return cluster state metadata (default: false)
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
filterMetadata: {
type: 'boolean',
name: 'filter_metadata'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterBlocks - Do not return information about blocks
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterIndexTemplates - Do not return information about index templates
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filterIndices - Limit returned metadata information to specific indices
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterMetadata - Do not return information about indices metadata
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterNodes - Do not return information about nodes
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterRoutingTable - Do not return information about shard allocation (`routing_table` and `routing_nodes`)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.state = ca({
params: {
filterBlocks: {
type: 'boolean',
name: 'filter_blocks'
},
filterIndexTemplates: {
type: 'boolean',
name: 'filter_index_templates'
},
filterIndices: {
type: 'list',
name: 'filter_indices'
},
filterMetadata: {
type: 'boolean',
name: 'filter_metadata'
},
filterNodes: {
type: 'boolean',
name: 'filter_nodes'
},
filterRoutingTable: {
type: 'boolean',
name: 'filter_routing_table'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/state'
}
});
/**
* Perform a [count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the operation
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.percolate - Percolator queries to execute while indexing the document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
percolate: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'string'
},
tokenizer: {
type: 'string'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.filter - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterCache - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.id - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.idCache - Clear ID caches for parent/child
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
filter: {
type: 'boolean'
},
filterCache: {
type: 'boolean',
name: 'filter_cache'
},
filterKeys: {
type: 'boolean',
name: 'filter_keys'
},
id: {
type: 'boolean'
},
idCache: {
type: 'boolean',
name: 'id_cache'
},
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or empty string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/'
}
],
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index with an alias
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be deleted
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'string'
},
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-delete-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` for all indices
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type to delete
*/
api.indices.prototype.deleteMapping = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register warmer for; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer (supports wildcards); leave empty to delete all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register warmer for; use `_all` or empty string to perform the operation on all types
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
}
],
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.full - If set to true a new index writer is created and settings that have been changed related to the index writer will be refreshed. Note: if a full flush is required for a setting to take effect this will be part of the settings update process and it not required to be executed by the user. (This setting can be considered as internal)
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
full: {
type: 'boolean'
},
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
refresh: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.getAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.field - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mapping/field/<%=field%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=field%>',
req: {
index: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=field%>',
req: {
field: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mapping',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getSettings = ca({
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.getTemplate = ca({
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.open](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Specify whether the index should be refreshed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
refresh: {
type: 'boolean'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index with an alias
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'string'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_alias'
}
],
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
ignoreConflicts: {
type: 'boolean',
name: 'ignore_conflicts'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/_mapping',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.refresh](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-gateway-snapshot.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.snapshotIndex = ca({
params: {
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
}
},
urls: [
{
fmt: '/<%=index%>/_gateway/snapshot',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_gateway/snapshot'
}
],
method: 'POST'
});
/**
* Perform a [indices.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.all - Return all available information
* @param {<<api-param-type-boolean,`Boolean`>>} params.clear - Reset the default level of detail
* @param {<<api-param-type-boolean,`Boolean`>>} params.completion - Return information about completion suggester stats
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `completion` metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.docs - Return information about indexed and deleted documents
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Return information about field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return detailed information for, when returning the `search` statistics
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterCache - Return information about filter cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Return information about flush operations
* @param {<<api-param-type-boolean,`Boolean`>>} params.get - Return information about get operations
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` statistics
* @param {<<api-param-type-boolean,`Boolean`>>} params.idCache - Return information about ID cache
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-boolean,`Boolean`>>} params.indexing - Return information about indexing operations
* @param {<<api-param-type-boolean,`Boolean`>>} params.merge - Return information about merge operations
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Return information about refresh operations
* @param {<<api-param-type-boolean,`Boolean`>>} params.search - Return information about search operations; use the `groups` parameter to include information for specific search groups
* @param {<<api-param-type-boolean,`Boolean`>>} params.store - Return information about the size of the index
* @param {<<api-param-type-boolean,`Boolean`>>} params.warmer - Return information about warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexingTypes - A comma-separated list of document types to include in the `indexing` statistics
* @param {<<api-param-type-string,`String`>>} params.metricFamily - Limit the information returned to a specific metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchGroups - A comma-separated list of search groups to include in the `search` statistics
*/
api.indices.prototype.stats = ca({
params: {
all: {
type: 'boolean'
},
clear: {
type: 'boolean'
},
completion: {
type: 'boolean'
},
completionFields: {
type: 'list',
name: 'completion_fields'
},
docs: {
type: 'boolean'
},
fielddata: {
type: 'boolean'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
filterCache: {
type: 'boolean',
name: 'filter_cache'
},
flush: {
type: 'boolean'
},
get: {
type: 'boolean'
},
groups: {
type: 'boolean'
},
idCache: {
type: 'boolean',
name: 'id_cache'
},
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
indexing: {
type: 'boolean'
},
merge: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
search: {
type: 'boolean'
},
store: {
type: 'boolean'
},
warmer: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-status.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.recovery - Return information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.snapshot - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.status = ca({
params: {
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
operationThreading: {
name: 'operation_threading'
},
recovery: {
type: 'boolean'
},
snapshot: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_status',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_status'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
operationThreading: {
name: 'operation_threading'
},
source: {
type: 'string'
},
q: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elasticsearch.org/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mlt](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-more-like-this.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.boostTerms - The boost factor
* @param {<<api-param-type-number,`Number`>>} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.maxQueryTerms - The maximum query terms to be included in the generated query
* @param {<<api-param-type-number,`Number`>>} params.maxWordLen - The minimum length of the word: longer words will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minWordLen - The minimum length of the word: shorter words will be ignored
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.mltFields - Specific fields to perform the query against
* @param {<<api-param-type-number,`Number`>>} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-number,`Number`>>} params.searchFrom - The offset from which to return results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document)
* @param {<<api-param-type-string,`String`>>} params.searchQueryHint - The search query hint
* @param {<<api-param-type-string,`String`>>} params.searchScroll - A scroll search request definition
* @param {<<api-param-type-number,`Number`>>} params.searchSize - The number of documents to return (default: 10)
* @param {<<api-param-type-string,`String`>>} params.searchSource - A specific search request definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stopWords - A list of stop words to be ignored
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.mlt = ca({
params: {
boostTerms: {
type: 'number',
name: 'boost_terms'
},
maxDocFreq: {
type: 'number',
name: 'max_doc_freq'
},
maxQueryTerms: {
type: 'number',
name: 'max_query_terms'
},
maxWordLen: {
type: 'number',
name: 'max_word_len'
},
minDocFreq: {
type: 'number',
name: 'min_doc_freq'
},
minTermFreq: {
type: 'number',
name: 'min_term_freq'
},
minWordLen: {
type: 'number',
name: 'min_word_len'
},
mltFields: {
type: 'list',
name: 'mlt_fields'
},
percentTermsToMatch: {
type: 'number',
name: 'percent_terms_to_match'
},
routing: {
type: 'string'
},
searchFrom: {
type: 'number',
name: 'search_from'
},
searchIndices: {
type: 'list',
name: 'search_indices'
},
searchQueryHint: {
type: 'string',
name: 'search_query_hint'
},
searchScroll: {
type: 'string',
name: 'search_scroll'
},
searchSize: {
type: 'number',
name: 'search_size'
},
searchSource: {
type: 'string',
name: 'search_source'
},
searchType: {
type: 'string',
name: 'search_type'
},
searchTypes: {
type: 'list',
name: 'search_types'
},
stopWords: {
type: 'list',
name: 'stop_words'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [msearch](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [percolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index with a registered percolator query
* @param {<<api-param-type-string,`String`>>} params.type - The document type
*/
api.percolate = ca({
params: {
preferLocal: {
type: 'boolean',
name: 'prefer_local'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [ping](http://www.elasticsearch.org/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [scroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'time'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indicesBoost - Comma-separated list of index boosts
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition using the Query DSL (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
from: {
type: 'number'
},
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
indicesBoost: {
type: 'list',
name: 'indices_boost'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'string',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
version: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [suggest](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreIndices: {
type: 'enum',
'default': 'none',
options: [
'none',
'missing'
],
name: 'ignore_indices'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
method: 'POST'
});
/**
* Perform a [update](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: mvel)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.percolate - Perform percolation during the operation; use specific registered query name, attribute, or wildcard
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.script - The URL-encoded script definition (instead of using request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
percolate: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.percolate - Percolator queries to execute while indexing the document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').factory;
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Explicitely set the replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodes](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.shards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.threadPool](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterMetadata - Don't return cluster state metadata (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
filterMetadata: {
type: 'boolean',
name: 'filter_metadata'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexTemplates - A comma separated list to return specific index templates when returning metadata
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
indexTemplates: {
type: 'list',
name: 'index_templates'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the operation
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'string'
},
tokenizer: {
type: 'string'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.filter - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterCache - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.id - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.idCache - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
filter: {
type: 'boolean'
},
filterCache: {
type: 'boolean',
name: 'filter_cache'
},
filterKeys: {
type: 'boolean',
name: 'filter_keys'
},
id: {
type: 'boolean'
},
idCache: {
type: 'boolean',
name: 'id_cache'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-delete-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices.
*/
api.indices.prototype.deleteMapping = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/_mapping',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.full - If set to true a new index writer is created and settings that have been changed related to the index writer will be refreshed. Note: if a full flush is required for a setting to take effect this will be part of the settings update process and it not required to be executed by the user. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
full: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.getAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.field - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=field%>',
req: {
index: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=field%>',
req: {
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=field%>',
req: {
field: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` or omit to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
ignoreConflicts: {
type: 'boolean',
name: 'ignore_conflicts'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.refresh](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/0.90/indices-gateway-snapshot.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.snapshotIndex = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_gateway/snapshot',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_gateway/snapshot'
}
],
method: 'POST'
});
/**
* Perform a [indices.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-status.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.recovery - Return information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.snapshot - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.status = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
recovery: {
type: 'boolean'
},
snapshot: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_status',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_status'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
source: {
type: 'string'
},
q: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elasticsearch.org/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mlt](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-more-like-this.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.boostTerms - The boost factor
* @param {<<api-param-type-number,`Number`>>} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.maxQueryTerms - The maximum query terms to be included in the generated query
* @param {<<api-param-type-number,`Number`>>} params.maxWordLength - The minimum length of the word: longer words will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minWordLength - The minimum length of the word: shorter words will be ignored
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.mltFields - Specific fields to perform the query against
* @param {<<api-param-type-number,`Number`>>} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-number,`Number`>>} params.searchFrom - The offset from which to return results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document)
* @param {<<api-param-type-string,`String`>>} params.searchQueryHint - The search query hint
* @param {<<api-param-type-string,`String`>>} params.searchScroll - A scroll search request definition
* @param {<<api-param-type-number,`Number`>>} params.searchSize - The number of documents to return (default: 10)
* @param {<<api-param-type-string,`String`>>} params.searchSource - A specific search request definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stopWords - A list of stop words to be ignored
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.mlt = ca({
params: {
boostTerms: {
type: 'number',
name: 'boost_terms'
},
maxDocFreq: {
type: 'number',
name: 'max_doc_freq'
},
maxQueryTerms: {
type: 'number',
name: 'max_query_terms'
},
maxWordLength: {
type: 'number',
name: 'max_word_length'
},
minDocFreq: {
type: 'number',
name: 'min_doc_freq'
},
minTermFreq: {
type: 'number',
name: 'min_term_freq'
},
minWordLength: {
type: 'number',
name: 'min_word_length'
},
mltFields: {
type: 'list',
name: 'mlt_fields'
},
percentTermsToMatch: {
type: 'number',
name: 'percent_terms_to_match'
},
routing: {
type: 'string'
},
searchFrom: {
type: 'number',
name: 'search_from'
},
searchIndices: {
type: 'list',
name: 'search_indices'
},
searchQueryHint: {
type: 'string',
name: 'search_query_hint'
},
searchScroll: {
type: 'string',
name: 'search_scroll'
},
searchSize: {
type: 'number',
name: 'search_size'
},
searchSource: {
type: 'string',
name: 'search_source'
},
searchType: {
type: 'string',
name: 'search_type'
},
searchTypes: {
type: 'list',
name: 'search_types'
},
stopWords: {
type: 'list',
name: 'stop_words'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugin'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugin'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.shutdown](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-shutdown.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.delay - Set the delay for the operation (default: 1s)
* @param {<<api-param-type-boolean,`Boolean`>>} params.exit - Exit the JVM as well (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes
*/
api.nodes.prototype.shutdown = ca({
params: {
delay: {
type: 'time'
},
exit: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_shutdown'
}
],
method: 'POST'
});
/**
* Perform a [nodes.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elasticsearch.org/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [scroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'duration'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indicesBoost - Comma-separated list of index boosts
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition using the Query DSL (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
indicesBoost: {
type: 'list',
name: 'indices_boost'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_create',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [termvector](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.termvector = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [update](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: mvel)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {anything} params.script - The URL-encoded script definition (instead of using request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').factory;
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Explicitely set the replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodes](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.shards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.threadPool](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterMetadata - Don't return cluster state metadata (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
filterMetadata: {
type: 'boolean',
name: 'filter_metadata'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexTemplates - A comma separated list to return specific index templates when returning metadata
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
indexTemplates: {
type: 'list',
name: 'index_templates'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the operation
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'string'
},
tokenizer: {
type: 'string'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.filter - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterCache - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.id - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.idCache - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
filter: {
type: 'boolean'
},
filterCache: {
type: 'boolean',
name: 'filter_cache'
},
filterKeys: {
type: 'boolean',
name: 'filter_keys'
},
id: {
type: 'boolean'
},
idCache: {
type: 'boolean',
name: 'id_cache'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-delete-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices.
*/
api.indices.prototype.deleteMapping = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/_mapping',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.full - If set to true a new index writer is created and settings that have been changed related to the index writer will be refreshed. Note: if a full flush is required for a setting to take effect this will be part of the settings update process and it not required to be executed by the user. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
full: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.getAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.field - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=field%>',
req: {
index: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=field%>',
req: {
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=field%>',
req: {
field: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a merge operation to run, even if there is a single segment in the index (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
},
force: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` or omit to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
ignoreConflicts: {
type: 'boolean',
name: 'ignore_conflicts'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.snapshotIndex](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-gateway-snapshot.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.snapshotIndex = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_gateway/snapshot',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_gateway/snapshot'
}
],
method: 'POST'
});
/**
* Perform a [indices.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-status.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.recovery - Return information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.snapshot - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.status = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
recovery: {
type: 'boolean'
},
snapshot: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_status',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_status'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
source: {
type: 'string'
},
q: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elasticsearch.org/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mlt](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-more-like-this.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.boostTerms - The boost factor
* @param {<<api-param-type-number,`Number`>>} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.maxQueryTerms - The maximum query terms to be included in the generated query
* @param {<<api-param-type-number,`Number`>>} params.maxWordLength - The minimum length of the word: longer words will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minWordLength - The minimum length of the word: shorter words will be ignored
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.mltFields - Specific fields to perform the query against
* @param {<<api-param-type-number,`Number`>>} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-number,`Number`>>} params.searchFrom - The offset from which to return results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document)
* @param {<<api-param-type-string,`String`>>} params.searchQueryHint - The search query hint
* @param {<<api-param-type-string,`String`>>} params.searchScroll - A scroll search request definition
* @param {<<api-param-type-number,`Number`>>} params.searchSize - The number of documents to return (default: 10)
* @param {<<api-param-type-string,`String`>>} params.searchSource - A specific search request definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stopWords - A list of stop words to be ignored
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.mlt = ca({
params: {
boostTerms: {
type: 'number',
name: 'boost_terms'
},
maxDocFreq: {
type: 'number',
name: 'max_doc_freq'
},
maxQueryTerms: {
type: 'number',
name: 'max_query_terms'
},
maxWordLength: {
type: 'number',
name: 'max_word_length'
},
minDocFreq: {
type: 'number',
name: 'min_doc_freq'
},
minTermFreq: {
type: 'number',
name: 'min_term_freq'
},
minWordLength: {
type: 'number',
name: 'min_word_length'
},
mltFields: {
type: 'list',
name: 'mlt_fields'
},
percentTermsToMatch: {
type: 'number',
name: 'percent_terms_to_match'
},
routing: {
type: 'string'
},
searchFrom: {
type: 'number',
name: 'search_from'
},
searchIndices: {
type: 'list',
name: 'search_indices'
},
searchQueryHint: {
type: 'string',
name: 'search_query_hint'
},
searchScroll: {
type: 'string',
name: 'search_scroll'
},
searchSize: {
type: 'number',
name: 'search_size'
},
searchSource: {
type: 'string',
name: 'search_source'
},
searchType: {
type: 'string',
name: 'search_type'
},
searchTypes: {
type: 'list',
name: 'search_types'
},
stopWords: {
type: 'list',
name: 'stop_words'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.shutdown](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cluster-nodes-shutdown.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.delay - Set the delay for the operation (default: 1s)
* @param {<<api-param-type-boolean,`Boolean`>>} params.exit - Exit the JVM as well (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes
*/
api.nodes.prototype.shutdown = ca({
params: {
delay: {
type: 'time'
},
exit: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_shutdown'
}
],
method: 'POST'
});
/**
* Perform a [nodes.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elasticsearch.org/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [scroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'duration'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indicesBoost - Comma-separated list of index boosts
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition using the Query DSL (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
indicesBoost: {
type: 'list',
name: 'indices_boost'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_create',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [suggest](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [termvector](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.termvector = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [update](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: mvel)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {anything} params.script - The URL-encoded script definition (instead of using request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.1/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').factory;
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Explicitely set the replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodes](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.shards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.threadPool](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterMetadata - Don't return cluster state metadata (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
filterMetadata: {
type: 'boolean',
name: 'filter_metadata'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the operation
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'string'
},
tokenizer: {
type: 'string'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.filter - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterCache - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.id - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.idCache - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
filter: {
type: 'boolean'
},
filterCache: {
type: 'boolean',
name: 'filter_cache'
},
filterKeys: {
type: 'boolean',
name: 'filter_keys'
},
id: {
type: 'boolean'
},
idCache: {
type: 'boolean',
name: 'id_cache'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-delete-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices.
*/
api.indices.prototype.deleteMapping = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/_mapping',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.full - If set to true a new index writer is created and settings that have been changed related to the index writer will be refreshed. Note: if a full flush is required for a setting to take effect this will be part of the settings update process and it not required to be executed by the user. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
full: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.getAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.field - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=field%>',
req: {
index: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=field%>',
req: {
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=field%>',
req: {
field: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a merge operation to run, even if there is a single segment in the index (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
},
force: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` or omit to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
ignoreConflicts: {
type: 'boolean',
name: 'ignore_conflicts'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-status.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.recovery - Return information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.snapshot - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.status = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
recovery: {
type: 'boolean'
},
snapshot: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_status',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_status'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
source: {
type: 'string'
},
q: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elasticsearch.org/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mlt](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-more-like-this.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.boostTerms - The boost factor
* @param {<<api-param-type-number,`Number`>>} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.maxQueryTerms - The maximum query terms to be included in the generated query
* @param {<<api-param-type-number,`Number`>>} params.maxWordLength - The minimum length of the word: longer words will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minWordLength - The minimum length of the word: shorter words will be ignored
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.mltFields - Specific fields to perform the query against
* @param {<<api-param-type-number,`Number`>>} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-number,`Number`>>} params.searchFrom - The offset from which to return results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document)
* @param {<<api-param-type-string,`String`>>} params.searchQueryHint - The search query hint
* @param {<<api-param-type-string,`String`>>} params.searchScroll - A scroll search request definition
* @param {<<api-param-type-number,`Number`>>} params.searchSize - The number of documents to return (default: 10)
* @param {<<api-param-type-string,`String`>>} params.searchSource - A specific search request definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stopWords - A list of stop words to be ignored
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.mlt = ca({
params: {
boostTerms: {
type: 'number',
name: 'boost_terms'
},
maxDocFreq: {
type: 'number',
name: 'max_doc_freq'
},
maxQueryTerms: {
type: 'number',
name: 'max_query_terms'
},
maxWordLength: {
type: 'number',
name: 'max_word_length'
},
minDocFreq: {
type: 'number',
name: 'min_doc_freq'
},
minTermFreq: {
type: 'number',
name: 'min_term_freq'
},
minWordLength: {
type: 'number',
name: 'min_word_length'
},
mltFields: {
type: 'list',
name: 'mlt_fields'
},
percentTermsToMatch: {
type: 'number',
name: 'percent_terms_to_match'
},
routing: {
type: 'string'
},
searchFrom: {
type: 'number',
name: 'search_from'
},
searchIndices: {
type: 'list',
name: 'search_indices'
},
searchQueryHint: {
type: 'string',
name: 'search_query_hint'
},
searchScroll: {
type: 'string',
name: 'search_scroll'
},
searchSize: {
type: 'number',
name: 'search_size'
},
searchSource: {
type: 'string',
name: 'search_source'
},
searchType: {
type: 'string',
name: 'search_type'
},
searchTypes: {
type: 'list',
name: 'search_types'
},
stopWords: {
type: 'list',
name: 'stop_words'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.shutdown](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cluster-nodes-shutdown.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.delay - Set the delay for the operation (default: 1s)
* @param {<<api-param-type-boolean,`Boolean`>>} params.exit - Exit the JVM as well (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes
*/
api.nodes.prototype.shutdown = ca({
params: {
delay: {
type: 'time'
},
exit: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_shutdown'
}
],
method: 'POST'
});
/**
* Perform a [nodes.stats](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elasticsearch.org/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [scroll](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'duration'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indicesBoost - Comma-separated list of index boosts
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition using the Query DSL (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
indicesBoost: {
type: 'list',
name: 'indices_boost'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_create',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [suggest](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [termvector](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.termvector = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [update](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: mvel)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {anything} params.script - The URL-encoded script definition (instead of using request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.2/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').factory;
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Explicitely set the replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.v=true] - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': true
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.threadPool](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterMetadata - Don't return cluster state metadata (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
filterMetadata: {
type: 'boolean',
name: 'filter_metadata'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the operation
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'string'
},
tokenizer: {
type: 'string'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.filter - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterCache - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.id - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.idCache - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
filter: {
type: 'boolean'
},
filterCache: {
type: 'boolean',
name: 'filter_cache'
},
filterKeys: {
type: 'boolean',
name: 'filter_keys'
},
id: {
type: 'boolean'
},
idCache: {
type: 'boolean',
name: 'id_cache'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-delete-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices.
*/
api.indices.prototype.deleteMapping = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/_mapping',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.full - If set to true a new index writer is created and settings that have been changed related to the index writer will be refreshed. Note: if a full flush is required for a setting to take effect this will be part of the settings update process and it not required to be executed by the user. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
full: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.getAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.field - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=field%>',
req: {
index: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=field%>',
req: {
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=field%>',
req: {
field: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'list',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a merge operation to run, even if there is a single segment in the index (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
},
force: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` or omit to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
ignoreConflicts: {
type: 'boolean',
name: 'ignore_conflicts'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.status](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-status.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.recovery - Return information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.snapshot - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.status = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
recovery: {
type: 'boolean'
},
snapshot: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_status',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_status'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
source: {
type: 'string'
},
q: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mlt](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-more-like-this.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.boostTerms - The boost factor
* @param {<<api-param-type-number,`Number`>>} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.maxQueryTerms - The maximum query terms to be included in the generated query
* @param {<<api-param-type-number,`Number`>>} params.maxWordLength - The minimum length of the word: longer words will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minWordLength - The minimum length of the word: shorter words will be ignored
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.mltFields - Specific fields to perform the query against
* @param {<<api-param-type-number,`Number`>>} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-number,`Number`>>} params.searchFrom - The offset from which to return results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document)
* @param {<<api-param-type-string,`String`>>} params.searchQueryHint - The search query hint
* @param {<<api-param-type-string,`String`>>} params.searchScroll - A scroll search request definition
* @param {<<api-param-type-number,`Number`>>} params.searchSize - The number of documents to return (default: 10)
* @param {<<api-param-type-string,`String`>>} params.searchSource - A specific search request definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stopWords - A list of stop words to be ignored
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.mlt = ca({
params: {
boostTerms: {
type: 'number',
name: 'boost_terms'
},
maxDocFreq: {
type: 'number',
name: 'max_doc_freq'
},
maxQueryTerms: {
type: 'number',
name: 'max_query_terms'
},
maxWordLength: {
type: 'number',
name: 'max_word_length'
},
minDocFreq: {
type: 'number',
name: 'min_doc_freq'
},
minTermFreq: {
type: 'number',
name: 'min_term_freq'
},
minWordLength: {
type: 'number',
name: 'min_word_length'
},
mltFields: {
type: 'list',
name: 'mlt_fields'
},
percentTermsToMatch: {
type: 'number',
name: 'percent_terms_to_match'
},
routing: {
type: 'string'
},
searchFrom: {
type: 'number',
name: 'search_from'
},
searchIndices: {
type: 'list',
name: 'search_indices'
},
searchQueryHint: {
type: 'string',
name: 'search_query_hint'
},
searchScroll: {
type: 'string',
name: 'search_scroll'
},
searchSize: {
type: 'number',
name: 'search_size'
},
searchSource: {
type: 'string',
name: 'search_source'
},
searchType: {
type: 'string',
name: 'search_type'
},
searchTypes: {
type: 'list',
name: 'search_types'
},
stopWords: {
type: 'list',
name: 'stop_words'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.shutdown](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cluster-nodes-shutdown.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.delay - Set the delay for the operation (default: 1s)
* @param {<<api-param-type-boolean,`Boolean`>>} params.exit - Exit the JVM as well (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes
*/
api.nodes.prototype.shutdown = ca({
params: {
delay: {
type: 'time'
},
exit: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_shutdown'
}
],
method: 'POST'
});
/**
* Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'duration'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indicesBoost - Comma-separated list of index boosts
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition using the Query DSL (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
indicesBoost: {
type: 'list',
name: 'indices_boost'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_create',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [suggest](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [termvector](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.termvector = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: mvel)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {anything} params.script - The URL-encoded script definition (instead of using request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/1.3/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').factory;
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Explicitely set the replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.v=true] - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': true
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.threadPool](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
source: {
type: 'string'
},
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the operation
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
source: {
type: 'string'
},
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'string'
},
tokenizer: {
type: 'string'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.filter - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterCache - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.id - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.idCache - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.queryCache - Clear query cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
filter: {
type: 'boolean'
},
filterCache: {
type: 'boolean',
name: 'filter_cache'
},
filterKeys: {
type: 'boolean',
name: 'filter_keys'
},
id: {
type: 'boolean'
},
idCache: {
type: 'boolean',
name: 'id_cache'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
queryCache: {
type: 'boolean',
name: 'query_cache'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-delete-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices.
*/
api.indices.prototype.deleteMapping = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/_mapping',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.full - If set to true a new index writer is created and settings that have been changed related to the index writer will be refreshed. Note: if a full flush is required for a setting to take effect this will be part of the settings update process and it not required to be executed by the user. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
full: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.field - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=field%>',
req: {
index: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=field%>',
req: {
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=field%>',
req: {
field: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a merge operation to run, even if there is a single segment in the index (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
},
force: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` or omit to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
ignoreConflicts: {
type: 'boolean',
name: 'ignore_conflicts'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.status](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-status.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.recovery - Return information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.snapshot - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.status = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
recovery: {
type: 'boolean'
},
snapshot: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_status',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_status'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
source: {
type: 'string'
},
q: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
source: {
type: 'string'
},
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mlt](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-more-like-this.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-number,`Number`>>} params.boostTerms - The boost factor
* @param {<<api-param-type-number,`Number`>>} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.maxQueryTerms - The maximum query terms to be included in the generated query
* @param {<<api-param-type-number,`Number`>>} params.maxWordLength - The minimum length of the word: longer words will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minWordLength - The minimum length of the word: shorter words will be ignored
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.mltFields - Specific fields to perform the query against
* @param {<<api-param-type-number,`Number`>>} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-number,`Number`>>} params.searchFrom - The offset from which to return results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document)
* @param {<<api-param-type-string,`String`>>} params.searchScroll - A scroll search request definition
* @param {<<api-param-type-number,`Number`>>} params.searchSize - The number of documents to return (default: 10)
* @param {<<api-param-type-string,`String`>>} params.searchSource - A specific search request definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stopWords - A list of stop words to be ignored
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.mlt = ca({
params: {
source: {
type: 'string'
},
boostTerms: {
type: 'number',
name: 'boost_terms'
},
maxDocFreq: {
type: 'number',
name: 'max_doc_freq'
},
maxQueryTerms: {
type: 'number',
name: 'max_query_terms'
},
maxWordLength: {
type: 'number',
name: 'max_word_length'
},
minDocFreq: {
type: 'number',
name: 'min_doc_freq'
},
minTermFreq: {
type: 'number',
name: 'min_term_freq'
},
minWordLength: {
type: 'number',
name: 'min_word_length'
},
mltFields: {
type: 'list',
name: 'mlt_fields'
},
percentTermsToMatch: {
type: 'number',
name: 'percent_terms_to_match'
},
routing: {
type: 'string'
},
searchFrom: {
type: 'number',
name: 'search_from'
},
searchIndices: {
type: 'list',
name: 'search_indices'
},
searchScroll: {
type: 'string',
name: 'search_scroll'
},
searchSize: {
type: 'number',
name: 'search_size'
},
searchSource: {
type: 'string',
name: 'search_source'
},
searchType: {
type: 'string',
name: 'search_type'
},
searchTypes: {
type: 'list',
name: 'search_types'
},
stopWords: {
type: 'list',
name: 'stop_words'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
source: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
source: {
type: 'string'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
*/
api.mtermvectors = ca({
params: {
source: {
type: 'string'
},
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.shutdown](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-nodes-shutdown.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.delay - Set the delay for the operation (default: 1s)
* @param {<<api-param-type-boolean,`Boolean`>>} params.exit - Exit the JVM as well (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes
*/
api.nodes.prototype.shutdown = ca({
params: {
delay: {
type: 'time'
},
exit: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_shutdown'
}
],
method: 'POST'
});
/**
* Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
source: {
type: 'string'
},
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
source: {
type: 'string'
},
scroll: {
type: 'duration'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indicesBoost - Comma-separated list of index boosts
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition using the Query DSL (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.queryCache - Specify if query cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
indicesBoost: {
type: 'list',
name: 'indices_boost'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
queryCache: {
type: 'boolean',
name: 'query_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchExists](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.searchExists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/exists',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/exists',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/exists'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
source: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_create',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [termvector](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document, when not specified a doc param should be supplied.
*/
api.termvector = ca({
params: {
source: {
type: 'string'
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {anything} params.script - The URL-encoded script definition (instead of using request body)
* @param {anything} params.scriptId - The id of a stored script
* @param {<<api-param-type-boolean,`Boolean`>>} params.scriptedUpsert - True if the script referenced in script or script_id should be called to perform inserts - defaults to false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {},
scriptId: {
name: 'script_id'
},
scriptedUpsert: {
type: 'boolean',
name: 'scripted_upsert'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/1.4/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').factory;
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Explicitely set the replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.v=true] - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': true
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.threadPool](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
source: {
type: 'string'
},
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the operation
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
source: {
type: 'string'
},
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'string'
},
tokenizer: {
type: 'string'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.filter - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterCache - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.id - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.idCache - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.queryCache - Clear query cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
filter: {
type: 'boolean'
},
filterCache: {
type: 'boolean',
name: 'filter_cache'
},
filterKeys: {
type: 'boolean',
name: 'filter_keys'
},
id: {
type: 'boolean'
},
idCache: {
type: 'boolean',
name: 'id_cache'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
queryCache: {
type: 'boolean',
name: 'query_cache'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-delete-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices.
*/
api.indices.prototype.deleteMapping = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/_mapping',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.field - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=field%>',
req: {
index: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=field%>',
req: {
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=field%>',
req: {
field: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a merge operation to run, even if there is a single segment in the index (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
},
force: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
ignoreConflicts: {
type: 'boolean',
name: 'ignore_conflicts'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.status](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-status.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.recovery - Return information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.snapshot - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.status = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
recovery: {
type: 'boolean'
},
snapshot: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_status',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_status'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
source: {
type: 'string'
},
q: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
source: {
type: 'string'
},
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mlt](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-more-like-this.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-number,`Number`>>} params.boostTerms - The boost factor
* @param {<<api-param-type-number,`Number`>>} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.maxQueryTerms - The maximum query terms to be included in the generated query
* @param {<<api-param-type-number,`Number`>>} params.maxWordLength - The minimum length of the word: longer words will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minWordLength - The minimum length of the word: shorter words will be ignored
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.mltFields - Specific fields to perform the query against
* @param {<<api-param-type-number,`Number`>>} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-number,`Number`>>} params.searchFrom - The offset from which to return results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document)
* @param {<<api-param-type-string,`String`>>} params.searchScroll - A scroll search request definition
* @param {<<api-param-type-number,`Number`>>} params.searchSize - The number of documents to return (default: 10)
* @param {<<api-param-type-string,`String`>>} params.searchSource - A specific search request definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stopWords - A list of stop words to be ignored
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.mlt = ca({
params: {
source: {
type: 'string'
},
boostTerms: {
type: 'number',
name: 'boost_terms'
},
maxDocFreq: {
type: 'number',
name: 'max_doc_freq'
},
maxQueryTerms: {
type: 'number',
name: 'max_query_terms'
},
maxWordLength: {
type: 'number',
name: 'max_word_length'
},
minDocFreq: {
type: 'number',
name: 'min_doc_freq'
},
minTermFreq: {
type: 'number',
name: 'min_term_freq'
},
minWordLength: {
type: 'number',
name: 'min_word_length'
},
mltFields: {
type: 'list',
name: 'mlt_fields'
},
percentTermsToMatch: {
type: 'number',
name: 'percent_terms_to_match'
},
routing: {
type: 'string'
},
searchFrom: {
type: 'number',
name: 'search_from'
},
searchIndices: {
type: 'list',
name: 'search_indices'
},
searchScroll: {
type: 'string',
name: 'search_scroll'
},
searchSize: {
type: 'number',
name: 'search_size'
},
searchSource: {
type: 'string',
name: 'search_source'
},
searchType: {
type: 'string',
name: 'search_type'
},
searchTypes: {
type: 'list',
name: 'search_types'
},
stopWords: {
type: 'list',
name: 'stop_words'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
source: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
source: {
type: 'string'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.mtermvectors = ca({
params: {
source: {
type: 'string'
},
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
ignoreIdleThreads: {
type: 'boolean',
name: 'ignore_idle_threads'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.shutdown](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cluster-nodes-shutdown.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.delay - Set the delay for the operation (default: 1s)
* @param {<<api-param-type-boolean,`Boolean`>>} params.exit - Exit the JVM as well (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes
*/
api.nodes.prototype.shutdown = ca({
params: {
delay: {
type: 'time'
},
exit: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_shutdown'
}
],
method: 'POST'
});
/**
* Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
source: {
type: 'string'
},
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
source: {
type: 'string'
},
scroll: {
type: 'duration'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indicesBoost - Comma-separated list of index boosts
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition using the Query DSL (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.queryCache - Specify if query cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
indicesBoost: {
type: 'list',
name: 'indices_boost'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
source: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
queryCache: {
type: 'boolean',
name: 'query_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchExists](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded query definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.searchExists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/exists',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/exists',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/exists'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
source: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_create',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition (instead of using request body)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
source: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [termvector](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.source - The URL-encoded request definition
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.termvector = ca({
params: {
source: {
type: 'string'
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {anything} params.script - The URL-encoded script definition (instead of using request body)
* @param {anything} params.scriptId - The id of a stored script
* @param {<<api-param-type-boolean,`Boolean`>>} params.scriptedUpsert - True if the script referenced in script or script_id should be called to perform inserts - defaults to false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {},
scriptId: {
name: 'script_id'
},
scriptedUpsert: {
type: 'boolean',
name: 'scripted_upsert'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/1.5/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 | 1 108 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').makeFactoryWithModifier(function (spec) {
return require('../utils').merge(spec, {
params: {
filterPath: {
type: 'list',
name: 'filter_path'
}
}
});
});
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Explicitely set the replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.v=true] - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': true
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.threadPool](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the operation
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [fieldStats](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-field-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for to get field statistics for (min value, max value, and more)
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Defines if field stats should be returned on a per index level or on a cluster wide level
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.fieldStats = ca({
params: {
fields: {
type: 'list'
},
level: {
type: 'enum',
'default': 'cluster',
options: [
'indices',
'cluster'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_field_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_field_stats'
}
],
method: 'POST'
});
/**
* Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'string'
},
tokenizer: {
type: 'string'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.filter - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterCache - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.id - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.idCache - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.queryCache - Clear query cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
filter: {
type: 'boolean'
},
filterCache: {
type: 'boolean',
name: 'filter_cache'
},
filterKeys: {
type: 'boolean',
name: 'filter_keys'
},
id: {
type: 'boolean'
},
idCache: {
type: 'boolean',
name: 'id_cache'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
queryCache: {
type: 'boolean',
name: 'query_cache'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-delete-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices.
*/
api.indices.prototype.deleteMapping = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/_mapping',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-synced-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
*/
api.indices.prototype.flushSynced = ca({
urls: [
{
fmt: '/<%=index%>/_flush/synced',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush/synced'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.field - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=field%>',
req: {
index: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=field%>',
req: {
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=field%>',
req: {
field: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a merge operation to run, even if there is a single segment in the index (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
},
force: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
ignoreConflicts: {
type: 'boolean',
name: 'ignore_conflicts'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.status](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-status.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.recovery - Return information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.snapshot - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.status = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
recovery: {
type: 'boolean'
},
snapshot: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_status',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_status'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
onlyAncientSegments: {
type: 'boolean',
name: 'only_ancient_segments'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-boolean,`Boolean`>>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
rewrite: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mlt](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-more-like-this.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.boostTerms - The boost factor
* @param {<<api-param-type-number,`Number`>>} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.maxQueryTerms - The maximum query terms to be included in the generated query
* @param {<<api-param-type-number,`Number`>>} params.maxWordLength - The minimum length of the word: longer words will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minWordLength - The minimum length of the word: shorter words will be ignored
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.mltFields - Specific fields to perform the query against
* @param {<<api-param-type-number,`Number`>>} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-number,`Number`>>} params.searchFrom - The offset from which to return results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document)
* @param {<<api-param-type-string,`String`>>} params.searchScroll - A scroll search request definition
* @param {<<api-param-type-number,`Number`>>} params.searchSize - The number of documents to return (default: 10)
* @param {<<api-param-type-string,`String`>>} params.searchSource - A specific search request definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stopWords - A list of stop words to be ignored
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.mlt = ca({
params: {
boostTerms: {
type: 'number',
name: 'boost_terms'
},
maxDocFreq: {
type: 'number',
name: 'max_doc_freq'
},
maxQueryTerms: {
type: 'number',
name: 'max_query_terms'
},
maxWordLength: {
type: 'number',
name: 'max_word_length'
},
minDocFreq: {
type: 'number',
name: 'min_doc_freq'
},
minTermFreq: {
type: 'number',
name: 'min_term_freq'
},
minWordLength: {
type: 'number',
name: 'min_word_length'
},
mltFields: {
type: 'list',
name: 'mlt_fields'
},
percentTermsToMatch: {
type: 'number',
name: 'percent_terms_to_match'
},
routing: {
type: 'string'
},
searchFrom: {
type: 'number',
name: 'search_from'
},
searchIndices: {
type: 'list',
name: 'search_indices'
},
searchScroll: {
type: 'string',
name: 'search_scroll'
},
searchSize: {
type: 'number',
name: 'search_size'
},
searchSource: {
type: 'string',
name: 'search_source'
},
searchType: {
type: 'string',
name: 'search_type'
},
searchTypes: {
type: 'list',
name: 'search_types'
},
stopWords: {
type: 'list',
name: 'stop_words'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
ignoreIdleThreads: {
type: 'boolean',
name: 'ignore_idle_threads'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.shutdown](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-shutdown.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.delay - Set the delay for the operation (default: 1s)
* @param {<<api-param-type-boolean,`Boolean`>>} params.exit - Exit the JVM as well (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes
*/
api.nodes.prototype.shutdown = ca({
params: {
delay: {
type: 'time'
},
exit: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_shutdown'
}
],
method: 'POST'
});
/**
* Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'duration'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.queryCache - Specify if query cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
queryCache: {
type: 'boolean',
name: 'query_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchExists](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.searchExists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/exists',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/exists',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/exists'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [termvector](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.termvector = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {anything} params.script - The URL-encoded script definition (instead of using request body)
* @param {anything} params.scriptId - The id of a stored script
* @param {<<api-param-type-boolean,`Boolean`>>} params.scriptedUpsert - True if the script referenced in script or script_id should be called to perform inserts - defaults to false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {},
scriptId: {
name: 'script_id'
},
scriptedUpsert: {
type: 'boolean',
name: 'scripted_upsert'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 | 1 108 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').makeFactoryWithModifier(function (spec) {
return require('../utils').merge(spec, {
params: {
filterPath: {
type: 'list',
name: 'filter_path'
}
}
});
});
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Explicitely set the replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.v=true] - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': true
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.threadPool](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the operation
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [fieldStats](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-field-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for to get field statistics for (min value, max value, and more)
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Defines if field stats should be returned on a per index level or on a cluster wide level
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.fieldStats = ca({
params: {
fields: {
type: 'list'
},
level: {
type: 'enum',
'default': 'cluster',
options: [
'indices',
'cluster'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_field_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_field_stats'
}
],
method: 'POST'
});
/**
* Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'string'
},
tokenizer: {
type: 'string'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.filter - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterCache - Clear filter caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.id - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.idCache - Clear ID caches for parent/child
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.queryCache - Clear query cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
filter: {
type: 'boolean'
},
filterCache: {
type: 'boolean',
name: 'filter_cache'
},
filterKeys: {
type: 'boolean',
name: 'filter_keys'
},
id: {
type: 'boolean'
},
idCache: {
type: 'boolean',
name: 'id_cache'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
queryCache: {
type: 'boolean',
name: 'query_cache'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-delete-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to delete (supports wildcards); use `_all` to delete all document types in the specified indices.
*/
api.indices.prototype.deleteMapping = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/_mapping',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-synced-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
*/
api.indices.prototype.flushSynced = ca({
urls: [
{
fmt: '/<%=index%>/_flush/synced',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush/synced'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.field - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=field%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=field%>',
req: {
index: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=field%>',
req: {
type: {
type: 'list'
},
field: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=field%>',
req: {
field: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a merge operation to run, even if there is a single segment in the index (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
},
force: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
ignoreConflicts: {
type: 'boolean',
name: 'ignore_conflicts'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.status](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-status.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.recovery - Return information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.snapshot - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.status = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
recovery: {
type: 'boolean'
},
snapshot: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_status',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_status'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
onlyAncientSegments: {
type: 'boolean',
name: 'only_ancient_segments'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-boolean,`Boolean`>>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
rewrite: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mlt](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-more-like-this.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.boostTerms - The boost factor
* @param {<<api-param-type-number,`Number`>>} params.maxDocFreq - The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.maxQueryTerms - The maximum query terms to be included in the generated query
* @param {<<api-param-type-number,`Number`>>} params.maxWordLength - The minimum length of the word: longer words will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
* @param {<<api-param-type-number,`Number`>>} params.minWordLength - The minimum length of the word: shorter words will be ignored
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.mltFields - Specific fields to perform the query against
* @param {<<api-param-type-number,`Number`>>} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-number,`Number`>>} params.searchFrom - The offset from which to return results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document)
* @param {<<api-param-type-string,`String`>>} params.searchScroll - A scroll search request definition
* @param {<<api-param-type-number,`Number`>>} params.searchSize - The number of documents to return (default: 10)
* @param {<<api-param-type-string,`String`>>} params.searchSource - A specific search request definition (instead of using the request body)
* @param {<<api-param-type-string,`String`>>} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stopWords - A list of stop words to be ignored
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.mlt = ca({
params: {
boostTerms: {
type: 'number',
name: 'boost_terms'
},
maxDocFreq: {
type: 'number',
name: 'max_doc_freq'
},
maxQueryTerms: {
type: 'number',
name: 'max_query_terms'
},
maxWordLength: {
type: 'number',
name: 'max_word_length'
},
minDocFreq: {
type: 'number',
name: 'min_doc_freq'
},
minTermFreq: {
type: 'number',
name: 'min_term_freq'
},
minWordLength: {
type: 'number',
name: 'min_word_length'
},
mltFields: {
type: 'list',
name: 'mlt_fields'
},
percentTermsToMatch: {
type: 'number',
name: 'percent_terms_to_match'
},
routing: {
type: 'string'
},
searchFrom: {
type: 'number',
name: 'search_from'
},
searchIndices: {
type: 'list',
name: 'search_indices'
},
searchScroll: {
type: 'string',
name: 'search_scroll'
},
searchSize: {
type: 'number',
name: 'search_size'
},
searchSource: {
type: 'string',
name: 'search_source'
},
searchType: {
type: 'string',
name: 'search_type'
},
searchTypes: {
type: 'list',
name: 'search_types'
},
stopWords: {
type: 'list',
name: 'stop_words'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_mlt',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
ignoreIdleThreads: {
type: 'boolean',
name: 'ignore_idle_threads'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'network',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.shutdown](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-shutdown.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.delay - Set the delay for the operation (default: 1s)
* @param {<<api-param-type-boolean,`Boolean`>>} params.exit - Exit the JVM as well (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes
*/
api.nodes.prototype.shutdown = ca({
params: {
delay: {
type: 'time'
},
exit: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_cluster/nodes/<%=nodeId%>/_shutdown',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_shutdown'
}
],
method: 'POST'
});
/**
* Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'filter_cache',
'flush',
'get',
'id_cache',
'indexing',
'merge',
'percolate',
'query_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'network',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'time'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.queryCache - Specify if query cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'string',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
queryCache: {
type: 'boolean',
name: 'query_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchExists](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.searchExists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/exists',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/exists',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/exists'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](http://www.elastic.co/guide/en/elasticsearch/reference/1.7/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [termvector](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document.
*/
api.termvector = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvector',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.script - The URL-encoded script definition (instead of using request body)
* @param {<<api-param-type-string,`String`>>} params.scriptId - The id of a stored script
* @param {<<api-param-type-boolean,`Boolean`>>} params.scriptedUpsert - True if the script referenced in script or script_id should be called to perform inserts - defaults to false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
replication: {
type: 'enum',
'default': 'sync',
options: [
'sync',
'async'
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {
type: 'string'
},
scriptId: {
type: 'string',
name: 'script_id'
},
scriptedUpsert: {
type: 'boolean',
name: 'scripted_upsert'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/1.6/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} [params.replication=sync] - Specific replication type
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 | 1 106 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').makeFactoryWithModifier(function (spec) {
return require('../utils').merge(spec, {
params: {
filterPath: {
type: 'list',
name: 'filter_path'
}
}
});
});
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - Default comma-separated list of fields to return in the response for updates
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodeattrs](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-nodeattrs.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodeattrs = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodeattrs'
}
});
/**
* Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.threadPool](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [fieldStats](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-field-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for to get field statistics for (min value, max value, and more)
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Defines if field stats should be returned on a per index level or on a cluster wide level
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.fieldStats = ca({
params: {
fields: {
type: 'list'
},
level: {
type: 'enum',
'default': 'cluster',
options: [
'indices',
'cluster'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_field_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_field_stats'
}
],
method: 'POST'
});
/**
* Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'list'
},
tokenizer: {
type: 'string'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.query - Clear query caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.request - Clear request cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
query: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
request: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to close
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-synced-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flushSynced = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush/synced',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush/synced'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list',
options: [
'_settings',
'_mappings',
'_warmers',
'_aliases'
]
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=fields%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=fields%>',
req: {
index: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=fields%>',
req: {
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The comma separated names of the index templates
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to open
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify whether the request to be warmed should use the request cache, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.verbose - Includes detailed memory usage by Lucene.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
verbose: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.shardStores](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-shards-stores.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.status - A comma-separated list of statuses used to filter on shards to get store information for
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.shardStores = ca({
params: {
status: {
type: 'list',
options: [
'green',
'yellow',
'red',
'all'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_shard_stores',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_shard_stores'
}
]
});
/**
* Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
onlyAncientSegments: {
type: 'boolean',
name: 'only_ancient_segments'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-boolean,`Boolean`>>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
rewrite: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
ignoreIdleThreads: {
type: 'boolean',
name: 'ignore_idle_threads'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [renderSearchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/2.0/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - The id of the stored search template
*/
api.renderSearchTemplate = ca({
urls: [
{
fmt: '/_render/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_render/template'
}
],
method: 'POST'
});
/**
* Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'duration'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchExists](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.searchExists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/exists',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/exists',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/exists'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [termvectors](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} params.dfs - Specifies if distributed frequencies should be returned instead shard frequencies.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document, when not specified a doc param should be supplied.
*/
api.termvectors = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
dfs: {
type: 'boolean',
'default': false,
required: false
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {anything} params.script - The URL-encoded script definition (instead of using request body)
* @param {anything} params.scriptId - The id of a stored script
* @param {<<api-param-type-boolean,`Boolean`>>} params.scriptedUpsert - True if the script referenced in script or script_id should be called to perform inserts - defaults to false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {},
scriptId: {
name: 'script_id'
},
scriptedUpsert: {
type: 'boolean',
name: 'scripted_upsert'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/2.0/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 | 1 109 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').makeFactoryWithModifier(function (spec) {
return require('../utils').merge(spec, {
params: {
filterPath: {
type: 'list',
name: 'filter_path'
}
}
});
});
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - Default comma-separated list of fields to return in the response for updates
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodeattrs](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-nodeattrs.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodeattrs = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodeattrs'
}
});
/**
* Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.repositories](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.repositories = ca({
params: {
local: {
type: 'boolean',
'default': false
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/repositories'
}
});
/**
* Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.snapshots](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - Name of repository from which to fetch the snapshot information
*/
api.cat.prototype.snapshots = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/snapshots/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
}
});
/**
* Perform a [cat.threadPool](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [fieldStats](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-field-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for to get field statistics for (min value, max value, and more)
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Defines if field stats should be returned on a per index level or on a cluster wide level
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.fieldStats = ca({
params: {
fields: {
type: 'list'
},
level: {
type: 'enum',
'default': 'cluster',
options: [
'indices',
'cluster'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_field_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_field_stats'
}
],
method: 'POST'
});
/**
* Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'list'
},
tokenizer: {
type: 'string'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.query - Clear query caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.request - Clear request cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
query: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
request: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to close
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-synced-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flushSynced = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush/synced',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush/synced'
}
],
method: 'POST'
});
/**
* Perform a [indices.forcemerge](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-forcemerge.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.forcemerge = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_forcemerge',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_forcemerge'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list',
options: [
'_settings',
'_mappings',
'_warmers',
'_aliases'
]
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=fields%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=fields%>',
req: {
index: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=fields%>',
req: {
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The comma separated names of the index templates
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to open
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify whether the request to be warmed should use the request cache, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.verbose - Includes detailed memory usage by Lucene.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
verbose: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.shardStores](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-shards-stores.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.status - A comma-separated list of statuses used to filter on shards to get store information for
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.shardStores = ca({
params: {
status: {
type: 'list',
options: [
'green',
'yellow',
'red',
'all'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_shard_stores',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_shard_stores'
}
]
});
/**
* Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
onlyAncientSegments: {
type: 'boolean',
name: 'only_ancient_segments'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-boolean,`Boolean`>>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
rewrite: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
ignoreIdleThreads: {
type: 'boolean',
name: 'ignore_idle_threads'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [renderSearchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - The id of the stored search template
*/
api.renderSearchTemplate = ca({
urls: [
{
fmt: '/_render/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_render/template'
}
],
method: 'POST'
});
/**
* Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'duration'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchExists](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.searchExists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/exists',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/exists',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/exists'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [termvectors](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} params.dfs - Specifies if distributed frequencies should be returned instead shard frequencies.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document, when not specified a doc param should be supplied.
*/
api.termvectors = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
dfs: {
type: 'boolean',
'default': false,
required: false
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {anything} params.script - The URL-encoded script definition (instead of using request body)
* @param {anything} params.scriptId - The id of a stored script
* @param {<<api-param-type-boolean,`Boolean`>>} params.scriptedUpsert - True if the script referenced in script or script_id should be called to perform inserts - defaults to false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {},
scriptId: {
name: 'script_id'
},
scriptedUpsert: {
type: 'boolean',
name: 'scripted_upsert'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/2.1/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 | 1 109 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').makeFactoryWithModifier(function (spec) {
return require('../utils').merge(spec, {
params: {
filterPath: {
type: 'list',
name: 'filter_path'
}
}
});
});
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot'];
/**
* Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - Default comma-separated list of fields to return in the response for updates
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodeattrs](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodeattrs = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodeattrs'
}
});
/**
* Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.repositories](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.repositories = ca({
params: {
local: {
type: 'boolean',
'default': false
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/repositories'
}
});
/**
* Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.snapshots](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Set to true to ignore unavailable snapshots
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - Name of repository from which to fetch the snapshot information
*/
api.cat.prototype.snapshots = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
'default': false,
name: 'ignore_unavailable'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/snapshots/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
}
});
/**
* Perform a [cat.threadPool](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [fieldStats](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for to get field statistics for (min value, max value, and more)
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Defines if field stats should be returned on a per index level or on a cluster wide level
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.fieldStats = ca({
params: {
fields: {
type: 'list'
},
level: {
type: 'enum',
'default': 'cluster',
options: [
'indices',
'cluster'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_field_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_field_stats'
}
],
method: 'POST'
});
/**
* Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-boolean,`Boolean`>>} params.detail - With `true`, outputs more advanced details. (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.attributes - A comma-separated list of token attributes to output, this parameter works only with `detail=true`
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'list'
},
tokenizer: {
type: 'string'
},
detail: {
type: 'boolean'
},
attributes: {
type: 'list'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.query - Clear query caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.request - Clear request cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
query: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
request: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to close
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flushSynced = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush/synced',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush/synced'
}
],
method: 'POST'
});
/**
* Perform a [indices.forcemerge](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.forcemerge = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_forcemerge',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_forcemerge'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list',
options: [
'_settings',
'_mappings',
'_warmers',
'_aliases'
]
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=fields%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=fields%>',
req: {
index: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=fields%>',
req: {
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The comma separated names of the index templates
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to open
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](https://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify whether the request to be warmed should use the request cache, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.verbose - Includes detailed memory usage by Lucene.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
verbose: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.shardStores](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.status - A comma-separated list of statuses used to filter on shards to get store information for
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.shardStores = ca({
params: {
status: {
type: 'list',
options: [
'green',
'yellow',
'red',
'all'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_shard_stores',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_shard_stores'
}
]
});
/**
* Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
onlyAncientSegments: {
type: 'boolean',
name: 'only_ancient_segments'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-boolean,`Boolean`>>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
rewrite: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
ignoreIdleThreads: {
type: 'boolean',
name: 'ignore_idle_threads'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [renderSearchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - The id of the stored search template
*/
api.renderSearchTemplate = ca({
urls: [
{
fmt: '/_render/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_render/template'
}
],
method: 'POST'
});
/**
* Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'duration'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchExists](https://www.elastic.co/guide/en/elasticsearch/reference/2.1/search-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.searchExists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/exists',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/exists',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/exists'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [termvectors](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} params.dfs - Specifies if distributed frequencies should be returned instead shard frequencies.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document, when not specified a doc param should be supplied.
*/
api.termvectors = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
dfs: {
type: 'boolean',
'default': false,
required: false
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {anything} params.script - The URL-encoded script definition (instead of using request body)
* @param {anything} params.scriptId - The id of a stored script
* @param {<<api-param-type-boolean,`Boolean`>>} params.scriptedUpsert - True if the script referenced in script or script_id should be called to perform inserts - defaults to false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {},
scriptId: {
name: 'script_id'
},
scriptedUpsert: {
type: 'boolean',
name: 'scripted_upsert'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 | 1 113 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').makeFactoryWithModifier(function (spec) {
return require('../utils').merge(spec, {
params: {
filterPath: {
type: 'list',
name: 'filter_path'
}
}
});
});
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot', 'tasks'];
/**
* Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - Default comma-separated list of fields to return in the response for updates
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodeattrs](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-nodeattrs.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodeattrs = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodeattrs'
}
});
/**
* Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.repositories](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-repositories.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.repositories = ca({
params: {
local: {
type: 'boolean',
'default': false
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/repositories'
}
});
/**
* Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.snapshots](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Set to true to ignore unavailable snapshots
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - Name of repository from which to fetch the snapshot information
*/
api.cat.prototype.snapshots = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
'default': false,
name: 'ignore_unavailable'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/snapshots/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
}
});
/**
* Perform a [cat.threadPool](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteScript](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [fieldStats](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-field-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for to get field statistics for (min value, max value, and more)
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Defines if field stats should be returned on a per index level or on a cluster wide level
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.fieldStats = ca({
params: {
fields: {
type: 'list'
},
level: {
type: 'enum',
'default': 'cluster',
options: [
'indices',
'cluster'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_field_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_field_stats'
}
],
method: 'POST'
});
/**
* Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - Deprecated : A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilter - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - Deprecated : A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filter - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - With `true`, outputs more advanced details. (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.attributes - A comma-separated list of token attributes to output, this parameter works only with `explain=true`
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
charFilter: {
type: 'list',
name: 'char_filter'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
filter: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'list'
},
tokenizer: {
type: 'string'
},
explain: {
type: 'boolean'
},
attributes: {
type: 'list'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.query - Clear query caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.request - Clear request cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
query: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
request: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to close
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-synced-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flushSynced = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush/synced',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush/synced'
}
],
method: 'POST'
});
/**
* Perform a [indices.forcemerge](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-forcemerge.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.forcemerge = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_forcemerge',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_forcemerge'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list',
options: [
'_settings',
'_mappings',
'_warmers',
'_aliases'
]
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=fields%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=fields%>',
req: {
index: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=fields%>',
req: {
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The comma separated names of the index templates
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.getWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to open
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify whether the request to be warmed should use the request cache, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.verbose - Includes detailed memory usage by Lucene.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
verbose: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.shardStores](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-shards-stores.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.status - A comma-separated list of statuses used to filter on shards to get store information for
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.shardStores = ca({
params: {
status: {
type: 'list',
options: [
'green',
'yellow',
'red',
'all'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_shard_stores',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_shard_stores'
}
]
});
/**
* Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
onlyAncientSegments: {
type: 'boolean',
name: 'only_ancient_segments'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-boolean,`Boolean`>>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
rewrite: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
ignoreIdleThreads: {
type: 'boolean',
name: 'ignore_idle_threads'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-reindex.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the reindex is complete.
*/
api.reindex = ca({
params: {
refresh: {
type: 'boolean'
},
timeout: {
type: 'time',
'default': '1m'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_reindex'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [renderSearchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/2.3/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - The id of the stored search template
*/
api.renderSearchTemplate = ca({
urls: [
{
fmt: '/_render/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_render/template'
}
],
method: 'POST'
});
/**
* Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'duration'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchExists](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.searchExists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/exists',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/exists',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/exists'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
api.tasks = namespace();
/**
* Perform a [tasks.cancel](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
* @param {<<api-param-type-string,`String`>>} params.parentNode - Cancel tasks with specified parent node.
* @param {<<api-param-type-string,`String`>>} params.parentTask - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
* @param {<<api-param-type-string,`String`>>} params.taskId - Cancel the task with specified task id (node_id:task_number)
*/
api.tasks.prototype.cancel = ca({
params: {
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'string',
name: 'parent_task'
}
},
urls: [
{
fmt: '/_tasks/<%=taskId%>/_cancel',
req: {
taskId: {
type: 'string'
}
}
},
{
fmt: '/_tasks/_cancel'
}
],
method: 'POST'
});
/**
* Perform a [tasks.list](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Return detailed task information (default: false)
* @param {<<api-param-type-string,`String`>>} params.parentNode - Return tasks with specified parent node.
* @param {<<api-param-type-string,`String`>>} params.parentTask - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Wait for the matching tasks to complete (default: false)
* @param {<<api-param-type-string,`String`>>} params.taskId - Return the task with specified id (node_id:task_number)
*/
api.tasks.prototype.list = ca({
params: {
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
detailed: {
type: 'boolean'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'string',
name: 'parent_task'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
}
},
urls: [
{
fmt: '/_tasks/<%=taskId%>',
req: {
taskId: {
type: 'string'
}
}
},
{
fmt: '/_tasks'
}
]
});
/**
* Perform a [termvectors](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} params.dfs - Specifies if distributed frequencies should be returned instead shard frequencies.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document, when not specified a doc param should be supplied.
*/
api.termvectors = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
dfs: {
type: 'boolean',
'default': false,
required: false
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {anything} params.script - The URL-encoded script definition (instead of using request body)
* @param {anything} params.scriptId - The id of a stored script
* @param {<<api-param-type-boolean,`Boolean`>>} params.scriptedUpsert - True if the script referenced in script or script_id should be called to perform inserts - defaults to false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {},
scriptId: {
name: 'script_id'
},
scriptedUpsert: {
type: 'boolean',
name: 'scripted_upsert'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'duration'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [updateByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-update-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.conflicts=abort] - What to do when the reindex hits version conflicts?
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-duration-string,`DurationString`>>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout.
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.versionType - Should the document increment the version number (internal) on hit or not (reindex)
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-number,`Number`>>} params.scrollSize - Size on the scroll request powering the update_by_query
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the reindex is complete.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.updateByQuery = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
conflicts: {
type: 'enum',
'default': 'abort',
options: [
'abort',
'proceed'
]
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'duration'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch'
],
name: 'search_type'
},
searchTimeout: {
type: 'time',
name: 'search_timeout'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'text',
name: 'suggest_text'
},
timeout: {
type: 'time',
'default': '1m'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
versionType: {
type: 'boolean',
name: 'version_type'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
},
refresh: {
type: 'boolean'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
scrollSize: {
type: 'integer',
name: 'scroll_size'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_update_by_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_update_by_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'POST'
});
/**
* Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/2.3/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 | 1 114 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').makeFactoryWithModifier(function (spec) {
return require('../utils').merge(spec, {
params: {
filterPath: {
type: 'list',
name: 'filter_path'
}
}
});
});
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'nodes', 'snapshot', 'tasks'];
/**
* Perform a [bulk](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - Default comma-separated list of fields to return in the response for updates
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodeattrs](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-nodeattrs.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodeattrs = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodeattrs'
}
});
/**
* Perform a [cat.nodes](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.repositories](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-repositories.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.repositories = ca({
params: {
local: {
type: 'boolean',
'default': false
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/repositories'
}
});
/**
* Perform a [cat.segments](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.snapshots](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Set to true to ignore unavailable snapshots
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - Name of repository from which to fetch the snapshot information
*/
api.cat.prototype.snapshots = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
'default': false,
name: 'ignore_unavailable'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/snapshots/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
}
});
/**
* Perform a [cat.threadPool](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Enables displaying the complete node ids
*/
api.cat.prototype.threadPool = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fullId: {
type: 'boolean',
'default': false,
name: 'full_id'
}
},
url: {
fmt: '/_cat/thread_pool'
}
});
/**
* Perform a [clearScroll](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.getSettings](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-number,`Number`>>} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'number',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForRelocatingShards: {
type: 'number',
name: 'wait_for_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [delete](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Specific write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteScript](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
fields: {
type: 'list'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [fieldStats](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-field-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for to get field statistics for (min value, max value, and more)
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Defines if field stats should be returned on a per index level or on a cluster wide level
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.fieldStats = ca({
params: {
fields: {
type: 'list'
},
level: {
type: 'enum',
'default': 'cluster',
options: [
'indices',
'cluster'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_field_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_field_stats'
}
],
method: 'POST'
});
/**
* Perform a [get](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
fields: {
type: 'list'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
params: {
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the affected shards after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilters - Deprecated : A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilter - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filters - Deprecated : A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filter - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - With `true`, outputs more advanced details. (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.attributes - A comma-separated list of token attributes to output, this parameter works only with `explain=true`
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilters: {
type: 'list',
name: 'char_filters'
},
charFilter: {
type: 'list',
name: 'char_filter'
},
field: {
type: 'string'
},
filters: {
type: 'list'
},
filter: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'list'
},
tokenizer: {
type: 'string'
},
explain: {
type: 'boolean'
},
attributes: {
type: 'list'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.query - Clear query caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.request - Clear request cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
query: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
request: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to close
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.delete](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteWarmer](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of warmer names to delete (supports wildcards); use `_all` to delete all warmers in the specified indices. You must specify a name either in the uri or in the parameters.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices.
*/
api.indices.prototype.deleteWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
name: {
type: 'list'
}
},
url: {
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is false and will cause an exception to be thrown on the shard level if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.flushSynced](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-synced-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flushSynced = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush/synced',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush/synced'
}
],
method: 'POST'
});
/**
* Perform a [indices.forcemerge](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-forcemerge.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.forcemerge = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_forcemerge',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_forcemerge'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list',
options: [
'_settings',
'_mappings',
'_warmers',
'_aliases'
]
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getAliases](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to filter
*/
api.indices.prototype.getAliases = ca({
params: {
timeout: {
type: 'time'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_aliases/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_aliases',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_aliases'
}
]
});
/**
* Perform a [indices.getFieldMapping](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=fields%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=fields%>',
req: {
index: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=fields%>',
req: {
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The comma separated names of the index templates
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.getWarmer](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.getWarmer = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_warmer',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_warmer'
}
]
});
/**
* Perform a [indices.open](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to open
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.optimize](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-optimize.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.optimize = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_optimize',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_optimize'
}
],
method: 'POST'
});
/**
* Perform a [indices.putAlias](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.putMapping](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putWarmer](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-warmers.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed) in the search request to warm
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices in the search request to warm. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both, in the search request to warm.
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify whether the request to be warmed should use the request cache, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to register the warmer for; use `_all` or omit to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>} params.name - The name of the warmer
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
*/
api.indices.prototype.putWarmer = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_warmer/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
{
fmt: '/_warmer/<%=name%>',
req: {
name: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.verbose - Includes detailed memory usage by Lucene.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
verbose: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.shardStores](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-shards-stores.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.status - A comma-separated list of statuses used to filter on shards to get store information for
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.shardStores = ca({
params: {
status: {
type: 'list',
options: [
'green',
'yellow',
'red',
'all'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_shard_stores',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_shard_stores'
}
]
});
/**
* Perform a [indices.stats](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.updateAliases](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
onlyAncientSegments: {
type: 'boolean',
name: 'only_ancient_segments'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-boolean,`Boolean`>>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
rewrite: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](https://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
/**
* Perform a [mget](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
fields: {
type: 'list'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mpercolate](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
ignoreIdleThreads: {
type: 'boolean',
name: 'ignore_idle_threads'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.stats](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at node, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'node',
'indices',
'shards'
]
},
types: {
type: 'list'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](https://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
params: {
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-reindex.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the reindex is complete.
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle for this request in sub-requests per second. 0 means set no throttle.
*/
api.reindex = ca({
params: {
refresh: {
type: 'boolean'
},
timeout: {
type: 'time',
'default': '1m'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
},
requestsPerSecond: {
type: 'number',
'default': 0,
name: 'requests_per_second'
}
},
url: {
fmt: '/_reindex'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [reindexRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-reindex.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. 0 means set no throttle. As does "unlimited". Otherwise it must be a float.
* @param {<<api-param-type-string,`String`>>} params.taskId - The task id to rethrottle
*/
api.reindexRethrottle = ca({
params: {
requestsPerSecond: {
type: 'number',
required: true,
name: 'requests_per_second'
}
},
url: {
fmt: '/_reindex/<%=taskId%>/_rethrottle',
req: {
taskId: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [renderSearchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/2.4/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - The id of the stored search template
*/
api.renderSearchTemplate = ca({
urls: [
{
fmt: '/_render/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_render/template'
}
],
method: 'POST'
});
/**
* Perform a [scroll](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'time'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch',
'count',
'scan'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'string',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchExists](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.searchExists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/exists',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/exists',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/exists'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch',
'count',
'scan'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
api.tasks = namespace();
/**
* Perform a [tasks.cancel](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/tasks.html#_task_cancellation) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
* @param {<<api-param-type-string,`String`>>} params.parentNode - Cancel tasks with specified parent node.
* @param {<<api-param-type-string,`String`>>} params.parentTask - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
* @param {<<api-param-type-string,`String`>>} params.taskId - Cancel the task with specified id
*/
api.tasks.prototype.cancel = ca({
params: {
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'string',
name: 'parent_task'
}
},
urls: [
{
fmt: '/_tasks/<%=taskId%>/_cancel',
req: {
taskId: {
type: 'string'
}
}
},
{
fmt: '/_tasks/_cancel'
}
],
method: 'POST'
});
/**
* Perform a [tasks.list](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/tasks.html#_current_tasks_information) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Return detailed task information (default: false)
* @param {<<api-param-type-string,`String`>>} params.parentNode - Return tasks with specified parent node.
* @param {<<api-param-type-string,`String`>>} params.parentTask - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Wait for the matching tasks to complete (default: false)
* @param {<<api-param-type-string,`String`>>} params.taskId - Return the task with specified id (node_id:task_number)
*/
api.tasks.prototype.list = ca({
params: {
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
detailed: {
type: 'boolean'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'string',
name: 'parent_task'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
}
},
urls: [
{
fmt: '/_tasks/<%=taskId%>',
req: {
taskId: {
type: 'string'
}
}
},
{
fmt: '/_tasks'
}
]
});
/**
* Perform a [termvectors](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} params.dfs - Specifies if distributed frequencies should be returned instead shard frequencies.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document, when not specified a doc param should be supplied.
*/
api.termvectors = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
dfs: {
type: 'boolean',
'default': false,
required: false
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the index after performing the operation
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.script - The URL-encoded script definition (instead of using request body)
* @param {<<api-param-type-string,`String`>>} params.scriptId - The id of a stored script
* @param {<<api-param-type-boolean,`Boolean`>>} params.scriptedUpsert - True if the script referenced in script or script_id should be called to perform inserts - defaults to false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
fields: {
type: 'list'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'boolean'
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
script: {
type: 'string'
},
scriptId: {
type: 'string',
name: 'script_id'
},
scriptedUpsert: {
type: 'boolean',
name: 'scripted_upsert'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [updateByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-update-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the field data representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.conflicts=abort] - What to do when the reindex hits version conflicts?
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-duration-string,`DurationString`>>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout.
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.versionType - Should the document increment the version number (internal) on hit or not (reindex)
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-number,`Number`>>} params.scrollSize - Size on the scroll request powering the update_by_query
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the reindex is complete.
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle for this request in sub-requests per second. 0 means set no throttle.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.updateByQuery = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
fields: {
type: 'list'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
conflicts: {
type: 'enum',
'default': 'abort',
options: [
'abort',
'proceed'
]
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch'
],
name: 'search_type'
},
searchTimeout: {
type: 'time',
name: 'search_timeout'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'string',
name: 'suggest_text'
},
timeout: {
type: 'time',
'default': '1m'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
versionType: {
type: 'boolean',
name: 'version_type'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
},
refresh: {
type: 'boolean'
},
consistency: {
type: 'enum',
options: [
'one',
'quorum',
'all'
]
},
scrollSize: {
type: 'number',
name: 'scroll_size'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
},
requestsPerSecond: {
type: 'number',
'default': 0,
name: 'requests_per_second'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_update_by_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_update_by_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'POST'
});
/**
* Perform a [create](https://www.elastic.co/guide/en/elasticsearch/reference/2.4/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.consistency - Explicit write consistency setting for the operation
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the affected shards after performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca.proxy(api.index, {
transform: function (params) {
params.op_type = 'create';
}
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 | 1 120 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').makeFactoryWithModifier(function (spec) {
return require('../utils').merge(spec, {
params: {
filterPath: {
type: 'list',
name: 'filter_path'
}
}
});
});
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'ingest', 'nodes', 'snapshot', 'tasks'];
/**
* Perform a [bulk](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - Default list of fields to extract and return from the _source field, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>} params.pipeline - The pipeline id to preprocess incoming documents with
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
},
fields: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
pipeline: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'kb',
'm',
'mb',
'g',
'gb',
't',
'tb',
'p',
'pb'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'kb',
'm',
'mb',
'g',
'gb',
't',
'tb',
'p',
'pb'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-string,`String`>>} params.health - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
health: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
]
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodeattrs](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-nodeattrs.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodeattrs = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodeattrs'
}
});
/**
* Perform a [cat.nodes](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Return the full node ID instead of the shortened version (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
format: {
type: 'string'
},
fullId: {
type: 'boolean',
name: 'full_id'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'kb',
'm',
'mb',
'g',
'gb',
't',
'tb',
'p',
'pb'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.repositories](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-repositories.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.repositories = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean',
'default': false
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/repositories'
}
});
/**
* Perform a [cat.segments](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
format: {
type: 'string'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.snapshots](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Set to true to ignore unavailable snapshots
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - Name of repository from which to fetch the snapshot information
*/
api.cat.prototype.snapshots = ca({
params: {
format: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
'default': false,
name: 'ignore_unavailable'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/snapshots/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_cat/snapshots'
}
]
});
/**
* Perform a [cat.tasks](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Return detailed task information (default: false)
* @param {<<api-param-type-string,`String`>>} params.parentNode - Return tasks with specified parent node.
* @param {<<api-param-type-number,`Number`>>} params.parentTask - Return tasks with specified parent task id. Set to -1 to return all.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.tasks = ca({
params: {
format: {
type: 'string'
},
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
detailed: {
type: 'boolean'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'number',
name: 'parent_task'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/tasks'
}
});
/**
* Perform a [cat.threadPool](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.size - The multiplier in which to display values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.threadPoolPatterns - A comma-separated list of regular-expressions to filter the thread pools in the output
*/
api.cat.prototype.threadPool = ca({
params: {
format: {
type: 'string'
},
size: {
type: 'enum',
options: [
'',
'k',
'm',
'g',
't',
'p'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/thread_pool/<%=threadPoolPatterns%>',
req: {
threadPoolPatterns: {
type: 'list'
}
}
},
{
fmt: '/_cat/thread_pool'
}
]
});
/**
* Perform a [clearScroll](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.allocationExplain](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-allocation-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeYesDecisions - Return 'YES' decisions in explanation (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDiskInfo - Return information about disk usage and shard sizes (default: false)
*/
api.cluster.prototype.allocationExplain = ca({
params: {
includeYesDecisions: {
type: 'boolean',
name: 'include_yes_decisions'
},
includeDiskInfo: {
type: 'boolean',
name: 'include_disk_info'
}
},
url: {
fmt: '/_cluster/allocation/explain'
},
method: 'POST'
});
/**
* Perform a [cluster.getSettings](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether to return all default clusters setting.
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
includeDefaults: {
type: 'boolean',
'default': false,
name: 'include_defaults'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-string,`String`>>} params.waitForEvents - Wait until all currently queued events with the given priority are processed
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForNoRelocatingShards - Whether to wait until there are no relocating shards in the cluster
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForEvents: {
type: 'enum',
options: [
'immediate',
'urgent',
'high',
'normal',
'low',
'languid'
],
name: 'wait_for_events'
},
waitForNoRelocatingShards: {
type: 'boolean',
name: 'wait_for_no_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-boolean,`Boolean`>>} params.retryFailed - Retries allocation of shards that are blocked due to too many subsequent allocation failures
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
retryFailed: {
type: 'boolean',
name: 'retry_failed'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [create](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.pipeline - The pipeline id to preprocess incoming documents with
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
},
pipeline: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_create',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [delete](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.conflicts=abort] - What to do when the delete-by-query hits version conflicts?
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-duration-string,`DurationString`>>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout.
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-number,`Number`>>} params.scrollSize - Size on the scroll request powering the update_by_query
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the delete-by-query is complete.
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
conflicts: {
type: 'enum',
'default': 'abort',
options: [
'abort',
'proceed'
]
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch'
],
name: 'search_type'
},
searchTimeout: {
type: 'time',
name: 'search_timeout'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
version: {
type: 'boolean'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
},
refresh: {
type: 'boolean'
},
timeout: {
type: 'time',
'default': '1m'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
scrollSize: {
type: 'number',
name: 'scroll_size'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
},
requestsPerSecond: {
type: 'number',
'default': 0,
name: 'requests_per_second'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_delete_by_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_delete_by_query',
req: {
index: {
type: 'list'
}
}
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [deleteScript](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
storedFields: {
type: 'list',
name: 'stored_fields'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [fieldStats](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-field-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for to get field statistics for (min value, max value, and more)
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Defines if field stats should be returned on a per index level or on a cluster wide level
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.fieldStats = ca({
params: {
fields: {
type: 'list'
},
level: {
type: 'enum',
'default': 'cluster',
options: [
'indices',
'cluster'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_field_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_field_stats'
}
],
method: 'POST'
});
/**
* Perform a [get](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
storedFields: {
type: 'list',
name: 'stored_fields'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.pipeline - The pipeline id to preprocess incoming documents with
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
},
pipeline: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilter - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filter - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - With `true`, outputs more advanced details. (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.attributes - A comma-separated list of token attributes to output, this parameter works only with `explain=true`
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilter: {
type: 'list',
name: 'char_filter'
},
field: {
type: 'string'
},
filter: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'list'
},
tokenizer: {
type: 'string'
},
explain: {
type: 'boolean'
},
attributes: {
type: 'list'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.query - Clear query caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.request - Clear request cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
query: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
request: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to close
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Set the number of active shards to wait for before the operation returns.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.delete](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.flushSynced](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-synced-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flushSynced = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush/synced',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush/synced'
}
],
method: 'POST'
});
/**
* Perform a [indices.forcemerge](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-forcemerge.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.forcemerge = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_forcemerge',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_forcemerge'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether to return all default setting for each of the indices.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
includeDefaults: {
type: 'boolean',
'default': false,
name: 'include_defaults'
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list',
options: [
'_settings',
'_mappings',
'_aliases'
]
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=all] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'all',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getFieldMapping](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=fields%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=fields%>',
req: {
index: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=fields%>',
req: {
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether to return all default setting for each of the indices.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
includeDefaults: {
type: 'boolean',
'default': false,
name: 'include_defaults'
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The comma separated names of the index templates
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.open](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to open
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.putAlias](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.putMapping](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.preserveExisting - Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
preserveExisting: {
type: 'boolean',
name: 'preserve_existing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.rollover](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-rollover-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Set the number of active shards to wait for on the newly created rollover index before the operation returns.
* @param {<<api-param-type-string,`String`>>} params.alias - The name of the alias to rollover
* @param {<<api-param-type-string,`String`>>} params.newIndex - The name of the rollover index
*/
api.indices.prototype.rollover = ca({
params: {
timeout: {
type: 'time'
},
dryRun: {
type: 'boolean',
name: 'dry_run'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
}
},
urls: [
{
fmt: '/<%=alias%>/_rollover/<%=newIndex%>',
req: {
alias: {
type: 'string'
},
newIndex: {
type: 'string'
}
}
},
{
fmt: '/<%=alias%>/_rollover',
req: {
alias: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.verbose - Includes detailed memory usage by Lucene.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
verbose: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.shardStores](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-shards-stores.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.status - A comma-separated list of statuses used to filter on shards to get store information for
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.shardStores = ca({
params: {
status: {
type: 'list',
options: [
'green',
'yellow',
'red',
'all'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_shard_stores',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_shard_stores'
}
]
});
/**
* Perform a [indices.shrink](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-shrink-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Set the number of active shards to wait for on the shrunken index before the operation returns.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the source index to shrink
* @param {<<api-param-type-string,`String`>>} params.target - The name of the target index to shrink into
*/
api.indices.prototype.shrink = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
}
},
url: {
fmt: '/<%=index%>/_shrink/<%=target%>',
req: {
index: {
type: 'string'
},
target: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.stats](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.updateAliases](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
onlyAncientSegments: {
type: 'boolean',
name: 'only_ancient_segments'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-boolean,`Boolean`>>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
rewrite: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](https://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
api.ingest = namespace();
/**
* Perform a [ingest.deletePipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.id - Pipeline ID
*/
api.ingest.prototype.deletePipeline = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_ingest/pipeline/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [ingest.getPipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.id - Comma separated list of pipeline ids. Wildcards supported
*/
api.ingest.prototype.getPipeline = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_ingest/pipeline/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_ingest/pipeline'
}
]
});
/**
* Perform a [ingest.putPipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.id - Pipeline ID
*/
api.ingest.prototype.putPipeline = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_ingest/pipeline/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [ingest.simulate](https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.verbose - Verbose mode. Display data output for each processor in executed pipeline
* @param {<<api-param-type-string,`String`>>} params.id - Pipeline ID
*/
api.ingest.prototype.simulate = ca({
params: {
verbose: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_ingest/pipeline/<%=id%>/_simulate',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_ingest/pipeline/_simulate'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mget](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
storedFields: {
type: 'list',
name: 'stored_fields'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mpercolate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.maxConcurrentSearches - Controls the maximum number of concurrent searches the multi search api will execute
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch'
],
name: 'search_type'
},
maxConcurrentSearches: {
type: 'number',
name: 'max_concurrent_searches'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearchTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearchTemplate = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch/template'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
ignoreIdleThreads: {
type: 'boolean',
name: 'ignore_idle_threads'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins',
'ingest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins',
'ingest'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.stats](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at index, node or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'indices',
'node',
'shards'
]
},
types: {
type: 'list'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](https://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-reindex.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the reindex is complete.
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts.
*/
api.reindex = ca({
params: {
refresh: {
type: 'boolean'
},
timeout: {
type: 'time',
'default': '1m'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
},
requestsPerSecond: {
type: 'number',
'default': 0,
name: 'requests_per_second'
}
},
url: {
fmt: '/_reindex'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [reindexRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-reindex.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
* @param {<<api-param-type-string,`String`>>} params.taskId - The task id to rethrottle
*/
api.reindexRethrottle = ca({
params: {
requestsPerSecond: {
type: 'number',
required: true,
name: 'requests_per_second'
}
},
url: {
fmt: '/_reindex/<%=taskId%>/_rethrottle',
req: {
taskId: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [renderSearchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/5.x/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - The id of the stored search template
*/
api.renderSearchTemplate = ca({
urls: [
{
fmt: '/_render/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_render/template'
}
],
method: 'POST'
});
/**
* Perform a [scroll](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'time'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.docvalueFields - A comma-separated list of fields to return as the docvalue representation of a field for each hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the docvalue representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
storedFields: {
type: 'list',
name: 'stored_fields'
},
docvalueFields: {
type: 'list',
name: 'docvalue_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'string',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
api.tasks = namespace();
/**
* Perform a [tasks.cancel](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
* @param {<<api-param-type-string,`String`>>} params.parentNode - Cancel tasks with specified parent node.
* @param {<<api-param-type-string,`String`>>} params.parentTask - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
* @param {<<api-param-type-string,`String`>>} params.taskId - Cancel the task with specified task id (node_id:task_number)
*/
api.tasks.prototype.cancel = ca({
params: {
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'string',
name: 'parent_task'
}
},
urls: [
{
fmt: '/_tasks/<%=taskId%>/_cancel',
req: {
taskId: {
type: 'string'
}
}
},
{
fmt: '/_tasks/_cancel'
}
],
method: 'POST'
});
/**
* Perform a [tasks.get](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Wait for the matching tasks to complete (default: false)
* @param {<<api-param-type-string,`String`>>} params.taskId - Return the task with specified id (node_id:task_number)
*/
api.tasks.prototype.get = ca({
params: {
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
}
},
url: {
fmt: '/_tasks/<%=taskId%>',
req: {
taskId: {
type: 'string'
}
}
}
});
/**
* Perform a [tasks.list](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Return detailed task information (default: false)
* @param {<<api-param-type-string,`String`>>} params.parentNode - Return tasks with specified parent node.
* @param {<<api-param-type-string,`String`>>} params.parentTask - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Wait for the matching tasks to complete (default: false)
* @param {<<api-param-type-string,`String`>>} [params.groupBy=nodes] - Group tasks by nodes or parent/child relationships
*/
api.tasks.prototype.list = ca({
params: {
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
detailed: {
type: 'boolean'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'string',
name: 'parent_task'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
groupBy: {
type: 'enum',
'default': 'nodes',
options: [
'nodes',
'parents'
],
name: 'group_by'
}
},
url: {
fmt: '/_tasks'
}
});
/**
* Perform a [termvectors](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document, when not specified a doc param should be supplied.
*/
api.termvectors = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
fields: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [updateByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-update-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.conflicts=abort] - What to do when the update by query hits version conflicts?
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
* @param {<<api-param-type-string,`String`>>} params.pipeline - Ingest pipeline to set on index requests made by this action. (default: none)
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-duration-string,`DurationString`>>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout.
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.versionType - Should the document increment the version number (internal) on hit or not (reindex)
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-number,`Number`>>} params.scrollSize - Size on the scroll request powering the update_by_query
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the update by query operation is complete.
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means set no throttle as does "unlimited" which is the only non-float this accepts.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.updateByQuery = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
conflicts: {
type: 'enum',
'default': 'abort',
options: [
'abort',
'proceed'
]
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
lowercaseExpandedTerms: {
type: 'boolean',
name: 'lowercase_expanded_terms'
},
pipeline: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch'
],
name: 'search_type'
},
searchTimeout: {
type: 'time',
name: 'search_timeout'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
version: {
type: 'boolean'
},
versionType: {
type: 'boolean',
name: 'version_type'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
},
refresh: {
type: 'boolean'
},
timeout: {
type: 'time',
'default': '1m'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
scrollSize: {
type: 'number',
name: 'scroll_size'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
},
requestsPerSecond: {
type: 'number',
'default': 0,
name: 'requests_per_second'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_update_by_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_update_by_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'POST'
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 7100 7101 7102 7103 7104 7105 7106 7107 7108 7109 7110 7111 7112 7113 7114 7115 7116 7117 7118 7119 7120 7121 7122 7123 7124 7125 7126 7127 7128 7129 7130 7131 7132 7133 7134 7135 7136 7137 7138 7139 7140 7141 7142 | 1 121 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').makeFactoryWithModifier(function (spec) {
return require('../utils').merge(spec, {
params: {
filterPath: {
type: 'list',
name: 'filter_path'
}
}
});
});
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'ingest', 'nodes', 'snapshot', 'tasks'];
/**
* Perform a [bulk](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - Default list of fields to extract and return from the _source field, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>} params.pipeline - The pipeline id to preprocess incoming documents with
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
},
fields: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
pipeline: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'kb',
'm',
'mb',
'g',
'gb',
't',
'tb',
'p',
'pb'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'kb',
'm',
'mb',
'g',
'gb',
't',
'tb',
'p',
'pb'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-string,`String`>>} params.health - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
health: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
]
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodeattrs](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-nodeattrs.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodeattrs = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodeattrs'
}
});
/**
* Perform a [cat.nodes](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Return the full node ID instead of the shortened version (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
format: {
type: 'string'
},
fullId: {
type: 'boolean',
name: 'full_id'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'kb',
'm',
'mb',
'g',
'gb',
't',
'tb',
'p',
'pb'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.repositories](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-repositories.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.repositories = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean',
'default': false
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/repositories'
}
});
/**
* Perform a [cat.segments](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
format: {
type: 'string'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.snapshots](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Set to true to ignore unavailable snapshots
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - Name of repository from which to fetch the snapshot information
*/
api.cat.prototype.snapshots = ca({
params: {
format: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
'default': false,
name: 'ignore_unavailable'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/snapshots/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_cat/snapshots'
}
]
});
/**
* Perform a [cat.tasks](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Return detailed task information (default: false)
* @param {<<api-param-type-string,`String`>>} params.parentNode - Return tasks with specified parent node.
* @param {<<api-param-type-number,`Number`>>} params.parentTask - Return tasks with specified parent task id. Set to -1 to return all.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.tasks = ca({
params: {
format: {
type: 'string'
},
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
detailed: {
type: 'boolean'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'number',
name: 'parent_task'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/tasks'
}
});
/**
* Perform a [cat.templates](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>} params.name - A pattern that returned template names must match
*/
api.cat.prototype.templates = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/templates/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/_cat/templates'
}
]
});
/**
* Perform a [cat.threadPool](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.size - The multiplier in which to display values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.threadPoolPatterns - A comma-separated list of regular-expressions to filter the thread pools in the output
*/
api.cat.prototype.threadPool = ca({
params: {
format: {
type: 'string'
},
size: {
type: 'enum',
options: [
'',
'k',
'm',
'g',
't',
'p'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/thread_pool/<%=threadPoolPatterns%>',
req: {
threadPoolPatterns: {
type: 'list'
}
}
},
{
fmt: '/_cat/thread_pool'
}
]
});
/**
* Perform a [clearScroll](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.allocationExplain](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-allocation-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeYesDecisions - Return 'YES' decisions in explanation (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDiskInfo - Return information about disk usage and shard sizes (default: false)
*/
api.cluster.prototype.allocationExplain = ca({
params: {
includeYesDecisions: {
type: 'boolean',
name: 'include_yes_decisions'
},
includeDiskInfo: {
type: 'boolean',
name: 'include_disk_info'
}
},
url: {
fmt: '/_cluster/allocation/explain'
},
method: 'POST'
});
/**
* Perform a [cluster.getSettings](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether to return all default clusters setting.
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
includeDefaults: {
type: 'boolean',
'default': false,
name: 'include_defaults'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-string,`String`>>} params.waitForEvents - Wait until all currently queued events with the given priority are processed
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForNoRelocatingShards - Whether to wait until there are no relocating shards in the cluster
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForEvents: {
type: 'enum',
options: [
'immediate',
'urgent',
'high',
'normal',
'low',
'languid'
],
name: 'wait_for_events'
},
waitForNoRelocatingShards: {
type: 'boolean',
name: 'wait_for_no_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-boolean,`Boolean`>>} params.retryFailed - Retries allocation of shards that are blocked due to too many subsequent allocation failures
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
retryFailed: {
type: 'boolean',
name: 'retry_failed'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [create](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.pipeline - The pipeline id to preprocess incoming documents with
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
},
pipeline: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_create',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [delete](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.conflicts=abort] - What to do when the delete-by-query hits version conflicts?
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-duration-string,`DurationString`>>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout.
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-number,`Number`>>} params.scrollSize - Size on the scroll request powering the update_by_query
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the delete-by-query is complete.
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle for this request in sub-requests per second. -1 means no throttle.
* @param {<<api-param-type-number,`Number`>>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
conflicts: {
type: 'enum',
'default': 'abort',
options: [
'abort',
'proceed'
]
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch'
],
name: 'search_type'
},
searchTimeout: {
type: 'time',
name: 'search_timeout'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
version: {
type: 'boolean'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
},
refresh: {
type: 'boolean'
},
timeout: {
type: 'time',
'default': '1m'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
scrollSize: {
type: 'number',
name: 'scroll_size'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
},
requestsPerSecond: {
type: 'number',
'default': 0,
name: 'requests_per_second'
},
slices: {
type: 'integer',
'default': 1
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_delete_by_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_delete_by_query',
req: {
index: {
type: 'list'
}
}
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [deleteScript](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
storedFields: {
type: 'list',
name: 'stored_fields'
},
lenient: {
type: 'boolean'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [fieldStats](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-field-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for to get field statistics for (min value, max value, and more)
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Defines if field stats should be returned on a per index level or on a cluster wide level
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.fieldStats = ca({
params: {
fields: {
type: 'list'
},
level: {
type: 'enum',
'default': 'cluster',
options: [
'indices',
'cluster'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_field_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_field_stats'
}
],
method: 'POST'
});
/**
* Perform a [get](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
storedFields: {
type: 'list',
name: 'stored_fields'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.pipeline - The pipeline id to preprocess incoming documents with
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
},
pipeline: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The name of the analyzer to use
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.charFilter - A comma-separated list of character filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.filter - A comma-separated list of filters to use for the analysis
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.text - The text on which the analysis should be performed (when request body is not used)
* @param {<<api-param-type-string,`String`>>} params.tokenizer - The name of the tokenizer to use for the analysis
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - With `true`, outputs more advanced details. (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.attributes - A comma-separated list of token attributes to output, this parameter works only with `explain=true`
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
analyzer: {
type: 'string'
},
charFilter: {
type: 'list',
name: 'char_filter'
},
field: {
type: 'string'
},
filter: {
type: 'list'
},
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
text: {
type: 'list'
},
tokenizer: {
type: 'string'
},
explain: {
type: 'boolean'
},
attributes: {
type: 'list'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.query - Clear query caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.request - Clear request cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
query: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
request: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to close
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Set the number of active shards to wait for before the operation returns.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.delete](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.flushSynced](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-synced-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flushSynced = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush/synced',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush/synced'
}
],
method: 'POST'
});
/**
* Perform a [indices.forcemerge](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-forcemerge.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.forcemerge = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_forcemerge',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_forcemerge'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether to return all default setting for each of the indices.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
includeDefaults: {
type: 'boolean',
'default': false,
name: 'include_defaults'
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list',
options: [
'_settings',
'_mappings',
'_aliases'
]
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=all] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'all',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getFieldMapping](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=fields%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=fields%>',
req: {
index: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=fields%>',
req: {
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether to return all default setting for each of the indices.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
includeDefaults: {
type: 'boolean',
'default': false,
name: 'include_defaults'
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The comma separated names of the index templates
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.open](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to open
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.putAlias](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.putMapping](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.preserveExisting - Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
preserveExisting: {
type: 'boolean',
name: 'preserve_existing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.rollover](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-rollover-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Set the number of active shards to wait for on the newly created rollover index before the operation returns.
* @param {<<api-param-type-string,`String`>>} params.alias - The name of the alias to rollover
* @param {<<api-param-type-string,`String`>>} params.newIndex - The name of the rollover index
*/
api.indices.prototype.rollover = ca({
params: {
timeout: {
type: 'time'
},
dryRun: {
type: 'boolean',
name: 'dry_run'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
}
},
urls: [
{
fmt: '/<%=alias%>/_rollover/<%=newIndex%>',
req: {
alias: {
type: 'string'
},
newIndex: {
type: 'string'
}
}
},
{
fmt: '/<%=alias%>/_rollover',
req: {
alias: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.verbose - Includes detailed memory usage by Lucene.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
verbose: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.shardStores](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-shards-stores.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.status - A comma-separated list of statuses used to filter on shards to get store information for
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.shardStores = ca({
params: {
status: {
type: 'list',
options: [
'green',
'yellow',
'red',
'all'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_shard_stores',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_shard_stores'
}
]
});
/**
* Perform a [indices.shrink](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-shrink-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Set the number of active shards to wait for on the shrunken index before the operation returns.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the source index to shrink
* @param {<<api-param-type-string,`String`>>} params.target - The name of the target index to shrink into
*/
api.indices.prototype.shrink = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
}
},
url: {
fmt: '/<%=index%>/_shrink/<%=target%>',
req: {
index: {
type: 'string'
},
target: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.stats](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.updateAliases](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
onlyAncientSegments: {
type: 'boolean',
name: 'only_ancient_segments'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
rewrite: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](https://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
api.ingest = namespace();
/**
* Perform a [ingest.deletePipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.id - Pipeline ID
*/
api.ingest.prototype.deletePipeline = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_ingest/pipeline/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [ingest.getPipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.id - Comma separated list of pipeline ids. Wildcards supported
*/
api.ingest.prototype.getPipeline = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_ingest/pipeline/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_ingest/pipeline'
}
]
});
/**
* Perform a [ingest.putPipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.id - Pipeline ID
*/
api.ingest.prototype.putPipeline = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_ingest/pipeline/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [ingest.simulate](https://www.elastic.co/guide/en/elasticsearch/plugins/5.x/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.verbose - Verbose mode. Display data output for each processor in executed pipeline
* @param {<<api-param-type-string,`String`>>} params.id - Pipeline ID
*/
api.ingest.prototype.simulate = ca({
params: {
verbose: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_ingest/pipeline/<%=id%>/_simulate',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_ingest/pipeline/_simulate'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mget](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
storedFields: {
type: 'list',
name: 'stored_fields'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mpercolate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.maxConcurrentSearches - Controls the maximum number of concurrent searches the multi search api will execute
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch'
],
name: 'search_type'
},
maxConcurrentSearches: {
type: 'number',
name: 'max_concurrent_searches'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearchTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearchTemplate = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch/template'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
ignoreIdleThreads: {
type: 'boolean',
name: 'ignore_idle_threads'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins',
'ingest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins',
'ingest'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.stats](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at index, node or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'indices',
'node',
'shards'
]
},
types: {
type: 'list'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](https://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-reindex.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the reindex is complete.
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle.
* @param {<<api-param-type-number,`Number`>>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
*/
api.reindex = ca({
params: {
refresh: {
type: 'boolean'
},
timeout: {
type: 'time',
'default': '1m'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
},
requestsPerSecond: {
type: 'number',
'default': 0,
name: 'requests_per_second'
},
slices: {
type: 'integer',
'default': 1
}
},
url: {
fmt: '/_reindex'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [reindexRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-reindex.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
* @param {<<api-param-type-string,`String`>>} params.taskId - The task id to rethrottle
*/
api.reindexRethrottle = ca({
params: {
requestsPerSecond: {
type: 'number',
required: true,
name: 'requests_per_second'
}
},
url: {
fmt: '/_reindex/<%=taskId%>/_rethrottle',
req: {
taskId: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [renderSearchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/5.x/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - The id of the stored search template
*/
api.renderSearchTemplate = ca({
urls: [
{
fmt: '/_render/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_render/template'
}
],
method: 'POST'
});
/**
* Perform a [scroll](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'time'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.docvalueFields - A comma-separated list of fields to return as the docvalue representation of a field for each hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the docvalue representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
storedFields: {
type: 'list',
name: 'stored_fields'
},
docvalueFields: {
type: 'list',
name: 'docvalue_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'string',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.profile - Specify whether to profile the query execution
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch'
],
name: 'search_type'
},
explain: {
type: 'boolean'
},
profile: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
api.tasks = namespace();
/**
* Perform a [tasks.cancel](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
* @param {<<api-param-type-string,`String`>>} params.parentNode - Cancel tasks with specified parent node.
* @param {<<api-param-type-string,`String`>>} params.parentTask - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
* @param {<<api-param-type-string,`String`>>} params.taskId - Cancel the task with specified task id (node_id:task_number)
*/
api.tasks.prototype.cancel = ca({
params: {
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'string',
name: 'parent_task'
}
},
urls: [
{
fmt: '/_tasks/<%=taskId%>/_cancel',
req: {
taskId: {
type: 'string'
}
}
},
{
fmt: '/_tasks/_cancel'
}
],
method: 'POST'
});
/**
* Perform a [tasks.get](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Wait for the matching tasks to complete (default: false)
* @param {<<api-param-type-string,`String`>>} params.taskId - Return the task with specified id (node_id:task_number)
*/
api.tasks.prototype.get = ca({
params: {
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
}
},
url: {
fmt: '/_tasks/<%=taskId%>',
req: {
taskId: {
type: 'string'
}
}
}
});
/**
* Perform a [tasks.list](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Return detailed task information (default: false)
* @param {<<api-param-type-string,`String`>>} params.parentNode - Return tasks with specified parent node.
* @param {<<api-param-type-string,`String`>>} params.parentTask - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Wait for the matching tasks to complete (default: false)
* @param {<<api-param-type-string,`String`>>} [params.groupBy=nodes] - Group tasks by nodes or parent/child relationships
*/
api.tasks.prototype.list = ca({
params: {
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
detailed: {
type: 'boolean'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'string',
name: 'parent_task'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
groupBy: {
type: 'enum',
'default': 'nodes',
options: [
'nodes',
'parents'
],
name: 'group_by'
}
},
url: {
fmt: '/_tasks'
}
});
/**
* Perform a [termvectors](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document, when not specified a doc param should be supplied.
*/
api.termvectors = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
fields: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [updateByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/5.x/docs-update-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.conflicts=abort] - What to do when the update by query hits version conflicts?
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-string,`String`>>} params.pipeline - Ingest pipeline to set on index requests made by this action. (default: none)
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-duration-string,`DurationString`>>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout.
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.versionType - Should the document increment the version number (internal) on hit or not (reindex)
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-number,`Number`>>} params.scrollSize - Size on the scroll request powering the update_by_query
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the update by query operation is complete.
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle.
* @param {<<api-param-type-number,`Number`>>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.updateByQuery = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
conflicts: {
type: 'enum',
'default': 'abort',
options: [
'abort',
'proceed'
]
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
pipeline: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch'
],
name: 'search_type'
},
searchTimeout: {
type: 'time',
name: 'search_timeout'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
version: {
type: 'boolean'
},
versionType: {
type: 'boolean',
name: 'version_type'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
},
refresh: {
type: 'boolean'
},
timeout: {
type: 'time',
'default': '1m'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
scrollSize: {
type: 'number',
name: 'scroll_size'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
},
requestsPerSecond: {
type: 'number',
'default': 0,
name: 'requests_per_second'
},
slices: {
type: 'integer',
'default': 1
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_update_by_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_update_by_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'POST'
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 1 | module.exports = {
'_default': require('./5_0'),
'5.0': require('./5_0'),
'2.4': require('./2_4'),
'2.3': require('./2_3'),
'2.2': require('./2_2'),
'2.1': require('./2_1'),
'2.0': require('./2_0'),
'1.7': require('./1_7'),
'1.6': require('./1_6'),
'1.5': require('./1_5'),
'1.4': require('./1_4'),
'1.3': require('./1_3'),
'1.2': require('./1_2'),
'1.1': require('./1_1'),
'1.0': require('./1_0'),
'0.90': require('./0_90'),
'5.x': require('./5_x'),
'master': require('./master')
};
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305 6306 6307 6308 6309 6310 6311 6312 6313 6314 6315 6316 6317 6318 6319 6320 6321 6322 6323 6324 6325 6326 6327 6328 6329 6330 6331 6332 6333 6334 6335 6336 6337 6338 6339 6340 6341 6342 6343 6344 6345 6346 6347 6348 6349 6350 6351 6352 6353 6354 6355 6356 6357 6358 6359 6360 6361 6362 6363 6364 6365 6366 6367 6368 6369 6370 6371 6372 6373 6374 6375 6376 6377 6378 6379 6380 6381 6382 6383 6384 6385 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395 6396 6397 6398 6399 6400 6401 6402 6403 6404 6405 6406 6407 6408 6409 6410 6411 6412 6413 6414 6415 6416 6417 6418 6419 6420 6421 6422 6423 6424 6425 6426 6427 6428 6429 6430 6431 6432 6433 6434 6435 6436 6437 6438 6439 6440 6441 6442 6443 6444 6445 6446 6447 6448 6449 6450 6451 6452 6453 6454 6455 6456 6457 6458 6459 6460 6461 6462 6463 6464 6465 6466 6467 6468 6469 6470 6471 6472 6473 6474 6475 6476 6477 6478 6479 6480 6481 6482 6483 6484 6485 6486 6487 6488 6489 6490 6491 6492 6493 6494 6495 6496 6497 6498 6499 6500 6501 6502 6503 6504 6505 6506 6507 6508 6509 6510 6511 6512 6513 6514 6515 6516 6517 6518 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529 6530 6531 6532 6533 6534 6535 6536 6537 6538 6539 6540 6541 6542 6543 6544 6545 6546 6547 6548 6549 6550 6551 6552 6553 6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 6564 6565 6566 6567 6568 6569 6570 6571 6572 6573 6574 6575 6576 6577 6578 6579 6580 6581 6582 6583 6584 6585 6586 6587 6588 6589 6590 6591 6592 6593 6594 6595 6596 6597 6598 6599 6600 6601 6602 6603 6604 6605 6606 6607 6608 6609 6610 6611 6612 6613 6614 6615 6616 6617 6618 6619 6620 6621 6622 6623 6624 6625 6626 6627 6628 6629 6630 6631 6632 6633 6634 6635 6636 6637 6638 6639 6640 6641 6642 6643 6644 6645 6646 6647 6648 6649 6650 6651 6652 6653 6654 6655 6656 6657 6658 6659 6660 6661 6662 6663 6664 6665 6666 6667 6668 6669 6670 6671 6672 6673 6674 6675 6676 6677 6678 6679 6680 6681 6682 6683 6684 6685 6686 6687 6688 6689 6690 6691 6692 6693 6694 6695 6696 6697 6698 6699 6700 6701 6702 6703 6704 6705 6706 6707 6708 6709 6710 6711 6712 6713 6714 6715 6716 6717 6718 6719 6720 6721 6722 6723 6724 6725 6726 6727 6728 6729 6730 6731 6732 6733 6734 6735 6736 6737 6738 6739 6740 6741 6742 6743 6744 6745 6746 6747 6748 6749 6750 6751 6752 6753 6754 6755 6756 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 6769 6770 6771 6772 6773 6774 6775 6776 6777 6778 6779 6780 6781 6782 6783 6784 6785 6786 6787 6788 6789 6790 6791 6792 6793 6794 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 6832 6833 6834 6835 6836 6837 6838 6839 6840 6841 6842 6843 6844 6845 6846 6847 6848 6849 6850 6851 6852 6853 6854 6855 6856 6857 6858 6859 6860 6861 6862 6863 6864 6865 6866 6867 6868 6869 6870 6871 6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 6937 6938 6939 6940 6941 6942 6943 6944 6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 7043 7044 7045 7046 7047 7048 7049 7050 7051 7052 7053 7054 7055 7056 7057 7058 7059 7060 7061 7062 7063 7064 7065 7066 7067 7068 7069 7070 7071 7072 7073 7074 7075 7076 7077 7078 7079 7080 7081 7082 7083 7084 7085 7086 7087 7088 7089 7090 7091 7092 7093 7094 7095 7096 7097 7098 7099 | 1 121 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ca = require('../client_action').makeFactoryWithModifier(function (spec) {
return require('../utils').merge(spec, {
params: {
filterPath: {
type: 'list',
name: 'filter_path'
}
}
});
});
var namespace = require('../client_action').namespaceFactory;
var api = module.exports = {};
api._namespaces = ['cat', 'cluster', 'indices', 'ingest', 'nodes', 'snapshot', 'tasks'];
/**
* Perform a [bulk](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the bulk operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.type - Default document type for items which don't provide one
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - Default comma-separated list of fields to return in the response for updates, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or default list of fields to return, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - Default list of fields to exclude from the returned _source field, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - Default list of fields to extract and return from the _source field, can be overridden on each sub-request
* @param {<<api-param-type-string,`String`>>} params.pipeline - The pipeline id to preprocess incoming documents with
* @param {<<api-param-type-string,`String`>>} params.index - Default index for items which don't provide one
*/
api.bulk = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
type: {
type: 'string'
},
fields: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
pipeline: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_bulk',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_bulk',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_bulk'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
api.cat = namespace();
/**
* Perform a [cat.aliases](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.cat.prototype.aliases = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/aliases/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_cat/aliases'
}
]
});
/**
* Perform a [cat.allocation](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information
*/
api.cat.prototype.allocation = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'kb',
'm',
'mb',
'g',
'gb',
't',
'tb',
'p',
'pb'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/allocation/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cat/allocation'
}
]
});
/**
* Perform a [cat.count](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.count = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/count/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/count'
}
]
});
/**
* Perform a [cat.fielddata](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return the fielddata size
*/
api.cat.prototype.fielddata = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'kb',
'm',
'mb',
'g',
'gb',
't',
'tb',
'p',
'pb'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
},
fields: {
type: 'list'
}
},
urls: [
{
fmt: '/_cat/fielddata/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
},
{
fmt: '/_cat/fielddata'
}
]
});
/**
* Perform a [cat.health](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} [params.ts=true] - Set to false to disable timestamping
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.health = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
ts: {
type: 'boolean',
'default': true
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/health'
}
});
/**
* Perform a [cat.help](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
*/
api.cat.prototype.help = ca({
params: {
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
}
},
url: {
fmt: '/_cat'
}
});
/**
* Perform a [cat.indices](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-string,`String`>>} params.health - A health status ("green", "yellow", or "red" to filter only indices matching the specified health status
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-boolean,`Boolean`>>} params.pri - Set to true to return stats only for primary shards
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.indices = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'm',
'g'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
health: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
]
},
help: {
type: 'boolean',
'default': false
},
pri: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/indices/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/indices'
}
]
});
/**
* Perform a [cat.master](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.master = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/master'
}
});
/**
* Perform a [cat.nodeattrs](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodeattrs = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodeattrs'
}
});
/**
* Perform a [cat.nodes](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.fullId - Return the full node ID instead of the shortened version (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.nodes = ca({
params: {
format: {
type: 'string'
},
fullId: {
type: 'boolean',
name: 'full_id'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/nodes'
}
});
/**
* Perform a [cat.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.pendingTasks = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/pending_tasks'
}
});
/**
* Perform a [cat.plugins](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.plugins = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/plugins'
}
});
/**
* Perform a [cat.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.bytes - The unit in which to display byte values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.recovery = ca({
params: {
format: {
type: 'string'
},
bytes: {
type: 'enum',
options: [
'b',
'k',
'kb',
'm',
'mb',
'g',
'gb',
't',
'tb',
'p',
'pb'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/recovery/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/recovery'
}
]
});
/**
* Perform a [cat.repositories](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.repositories = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean',
'default': false
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/repositories'
}
});
/**
* Perform a [cat.segments](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.segments = ca({
params: {
format: {
type: 'string'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/segments/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/segments'
}
]
});
/**
* Perform a [cat.shards](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to limit the returned information
*/
api.cat.prototype.shards = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/shards/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cat/shards'
}
]
});
/**
* Perform a [cat.snapshots](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Set to true to ignore unavailable snapshots
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - Name of repository from which to fetch the snapshot information
*/
api.cat.prototype.snapshots = ca({
params: {
format: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
'default': false,
name: 'ignore_unavailable'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/snapshots/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_cat/snapshots'
}
]
});
/**
* Perform a [cat.tasks](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Return detailed task information (default: false)
* @param {<<api-param-type-string,`String`>>} params.parentNode - Return tasks with specified parent node.
* @param {<<api-param-type-number,`Number`>>} params.parentTask - Return tasks with specified parent task id. Set to -1 to return all.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
*/
api.cat.prototype.tasks = ca({
params: {
format: {
type: 'string'
},
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
detailed: {
type: 'boolean'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'number',
name: 'parent_task'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
url: {
fmt: '/_cat/tasks'
}
});
/**
* Perform a [cat.templates](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>} params.name - A pattern that returned template names must match
*/
api.cat.prototype.templates = ca({
params: {
format: {
type: 'string'
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/templates/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
{
fmt: '/_cat/templates'
}
]
});
/**
* Perform a [cat.threadPool](http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.format - a short version of the Accept header, e.g. json, yaml
* @param {<<api-param-type-string,`String`>>} params.size - The multiplier in which to display values
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.h - Comma-separated list of column names to display
* @param {<<api-param-type-boolean,`Boolean`>>} params.help - Return help information
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.s - Comma-separated list of column names or column aliases to sort by
* @param {<<api-param-type-boolean,`Boolean`>>} params.v - Verbose mode. Display column headers
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.threadPoolPatterns - A comma-separated list of regular-expressions to filter the thread pools in the output
*/
api.cat.prototype.threadPool = ca({
params: {
format: {
type: 'string'
},
size: {
type: 'enum',
options: [
'',
'k',
'm',
'g',
't',
'p'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
h: {
type: 'list'
},
help: {
type: 'boolean',
'default': false
},
s: {
type: 'list'
},
v: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_cat/thread_pool/<%=threadPoolPatterns%>',
req: {
threadPoolPatterns: {
type: 'list'
}
}
},
{
fmt: '/_cat/thread_pool'
}
]
});
/**
* Perform a [clearScroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.scrollId - A comma-separated list of scroll IDs to clear
*/
api.clearScroll = ca({
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'list'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'DELETE'
});
api.cluster = namespace();
/**
* Perform a [cluster.allocationExplain](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeYesDecisions - Return 'YES' decisions in explanation (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDiskInfo - Return information about disk usage and shard sizes (default: false)
*/
api.cluster.prototype.allocationExplain = ca({
params: {
includeYesDecisions: {
type: 'boolean',
name: 'include_yes_decisions'
},
includeDiskInfo: {
type: 'boolean',
name: 'include_disk_info'
}
},
url: {
fmt: '/_cluster/allocation/explain'
},
method: 'POST'
});
/**
* Perform a [cluster.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether to return all default clusters setting.
*/
api.cluster.prototype.getSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
includeDefaults: {
type: 'boolean',
'default': false,
name: 'include_defaults'
}
},
url: {
fmt: '/_cluster/settings'
}
});
/**
* Perform a [cluster.health](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Specify the level of detail for returned information
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Wait until the specified number of shards is active
* @param {<<api-param-type-string,`String`>>} params.waitForNodes - Wait until the specified number of nodes is available
* @param {<<api-param-type-string,`String`>>} params.waitForEvents - Wait until all currently queued events with the given priority are processed
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForNoRelocatingShards - Whether to wait until there are no relocating shards in the cluster
* @param {<<api-param-type-string,`String`>>} params.waitForStatus - Wait until cluster is in a specific state
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - Limit the information returned to a specific index
*/
api.cluster.prototype.health = ca({
params: {
level: {
type: 'enum',
'default': 'cluster',
options: [
'cluster',
'indices',
'shards'
]
},
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
waitForNodes: {
type: 'string',
name: 'wait_for_nodes'
},
waitForEvents: {
type: 'enum',
options: [
'immediate',
'urgent',
'high',
'normal',
'low',
'languid'
],
name: 'wait_for_events'
},
waitForNoRelocatingShards: {
type: 'boolean',
name: 'wait_for_no_relocating_shards'
},
waitForStatus: {
type: 'enum',
'default': null,
options: [
'green',
'yellow',
'red'
],
name: 'wait_for_status'
}
},
urls: [
{
fmt: '/_cluster/health/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/health'
}
]
});
/**
* Perform a [cluster.pendingTasks](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.cluster.prototype.pendingTasks = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_cluster/pending_tasks'
}
});
/**
* Perform a [cluster.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.putSettings = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/settings'
},
method: 'PUT'
});
/**
* Perform a [cluster.reroute](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - Simulate the operation only and return the resulting state
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return an explanation of why the commands can or cannot be executed
* @param {<<api-param-type-boolean,`Boolean`>>} params.retryFailed - Retries allocation of shards that are blocked due to too many subsequent allocation failures
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics. Defaults to all but metadata
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
*/
api.cluster.prototype.reroute = ca({
params: {
dryRun: {
type: 'boolean',
name: 'dry_run'
},
explain: {
type: 'boolean'
},
retryFailed: {
type: 'boolean',
name: 'retry_failed'
},
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'master_node',
'version'
]
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_cluster/reroute'
},
method: 'POST'
});
/**
* Perform a [cluster.state](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
*/
api.cluster.prototype.state = ca({
params: {
local: {
type: 'boolean'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/_cluster/state/<%=metric%>/<%=index%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
},
index: {
type: 'list'
}
}
},
{
fmt: '/_cluster/state/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'blocks',
'metadata',
'nodes',
'routing_table',
'routing_nodes',
'master_node',
'version'
]
}
}
},
{
fmt: '/_cluster/state'
}
]
});
/**
* Perform a [cluster.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.cluster.prototype.stats = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_cluster/stats/nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_cluster/stats'
}
]
});
/**
* Perform a [count](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.minScore - Include only documents with a specific `_score` value in the result
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to restrict the results
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of types to restrict the results
*/
api.count = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
minScore: {
type: 'number',
name: 'min_score'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_count',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_count',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_count'
}
],
method: 'POST'
});
/**
* Perform a [countPercolate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to count percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to count percolate document into. Defaults to type.
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being count percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.countPercolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate/count',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [create](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.pipeline - The pipeline id to preprocess incoming documents with
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.create = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
},
pipeline: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_create',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of parent document
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api['delete'] = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.conflicts=abort] - What to do when the delete-by-query hits version conflicts?
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-duration-string,`DurationString`>>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout.
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the delete by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-number,`Number`>>} params.scrollSize - Size on the scroll request powering the update_by_query
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the delete-by-query is complete.
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle for this request in sub-requests per second. -1 means no throttle.
* @param {<<api-param-type-number,`Number`>>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.deleteByQuery = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
conflicts: {
type: 'enum',
'default': 'abort',
options: [
'abort',
'proceed'
]
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch'
],
name: 'search_type'
},
searchTimeout: {
type: 'time',
name: 'search_timeout'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
version: {
type: 'boolean'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
},
refresh: {
type: 'boolean'
},
timeout: {
type: 'time',
'default': '1m'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
scrollSize: {
type: 'number',
name: 'scroll_size'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
},
requestsPerSecond: {
type: 'number',
'default': 0,
name: 'requests_per_second'
},
slices: {
type: 'integer',
'default': 1
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_delete_by_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_delete_by_query',
req: {
index: {
type: 'list'
}
}
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [deleteScript](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.deleteScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.deleteTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [exists](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.exists = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [explain](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer for the query string query
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The default field for query string query (default: _all)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return in the response
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.explain = ca({
params: {
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
analyzer: {
type: 'string'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
storedFields: {
type: 'list',
name: 'stored_fields'
},
lenient: {
type: 'boolean'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_explain',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [fieldStats](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for to get field statistics for (min value, max value, and more)
* @param {<<api-param-type-string,`String`>>} [params.level=cluster] - Defines if field stats should be returned on a per index level or on a cluster wide level
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.fieldStats = ca({
params: {
fields: {
type: 'list'
},
level: {
type: 'enum',
'default': 'cluster',
options: [
'indices',
'cluster'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_field_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_field_stats'
}
],
method: 'POST'
});
/**
* Perform a [get](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
*/
api.get = ca({
params: {
storedFields: {
type: 'list',
name: 'stored_fields'
},
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getScript](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.getScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getSource](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.parent - The ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - The document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document; use `_all` to fetch the first document matching the ID across all types
*/
api.getSource = ca({
params: {
parent: {
type: 'string'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_source',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
}
});
/**
* Perform a [getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.getTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
}
});
/**
* Perform a [index](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the index operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>} [params.opType=index] - Explicit operation type
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.pipeline - The pipeline id to preprocess incoming documents with
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.index = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
opType: {
type: 'enum',
'default': 'index',
options: [
'index',
'create'
],
name: 'op_type'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
},
pipeline: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'POST'
});
api.indices = namespace();
/**
* Perform a [indices.analyze](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-analyze.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index to scope the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
* @param {<<api-param-type-string,`String`>>} [params.format=detailed] - Format of the output
*/
api.indices.prototype.analyze = ca({
params: {
index: {
type: 'string'
},
preferLocal: {
type: 'boolean',
name: 'prefer_local'
},
format: {
type: 'enum',
'default': 'detailed',
options: [
'detailed',
'text'
]
}
},
urls: [
{
fmt: '/<%=index%>/_analyze',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_analyze'
}
],
method: 'POST'
});
/**
* Perform a [indices.clearCache](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-clearcache.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.fieldData - Clear field data
* @param {<<api-param-type-boolean,`Boolean`>>} params.fielddata - Clear field data
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
* @param {<<api-param-type-boolean,`Boolean`>>} params.query - Clear query caches
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index name to limit the operation
* @param {<<api-param-type-boolean,`Boolean`>>} params.recycler - Clear the recycler cache
* @param {<<api-param-type-boolean,`Boolean`>>} params.request - Clear request cache
*/
api.indices.prototype.clearCache = ca({
params: {
fieldData: {
type: 'boolean',
name: 'field_data'
},
fielddata: {
type: 'boolean'
},
fields: {
type: 'list'
},
query: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
index: {
type: 'list'
},
recycler: {
type: 'boolean'
},
request: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_cache/clear',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_cache/clear'
}
],
method: 'POST'
});
/**
* Perform a [indices.close](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to close
*/
api.indices.prototype.close = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_close',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.create](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-create-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Set the number of active shards to wait for before the operation returns.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
*/
api.indices.prototype.create = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices
*/
api.indices.prototype['delete'] = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteAlias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices.
*/
api.indices.prototype.deleteAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.deleteTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.deleteTemplate = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [indices.exists](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of indices to check
*/
api.indices.prototype.exists = ca({
params: {
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsAlias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.existsAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
}
],
method: 'HEAD'
});
/**
* Perform a [indices.existsTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.existsTemplate = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.existsType](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-types-exists.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to check
*/
api.indices.prototype.existsType = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
url: {
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
method: 'HEAD'
});
/**
* Perform a [indices.flush](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitIfOngoing - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. The default is true. If set to false the flush will be skipped iff if another flush operation is already running.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flush = ca({
params: {
force: {
type: 'boolean'
},
waitIfOngoing: {
type: 'boolean',
name: 'wait_if_ongoing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush'
}
],
method: 'POST'
});
/**
* Perform a [indices.flushSynced](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-synced-flush.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
*/
api.indices.prototype.flushSynced = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/_flush/synced',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_flush/synced'
}
],
method: 'POST'
});
/**
* Perform a [indices.forcemerge](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-forcemerge.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flush - Specify whether the index should be flushed after performing the operation (default: true)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-number,`Number`>>} params.maxNumSegments - The number of segments the index should be merged into (default: dynamic)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyExpungeDeletes - Specify whether the operation should only expunge deleted documents
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.forcemerge = ca({
params: {
flush: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
maxNumSegments: {
type: 'number',
name: 'max_num_segments'
},
onlyExpungeDeletes: {
type: 'boolean',
name: 'only_expunge_deletes'
},
operationThreading: {
name: 'operation_threading'
},
waitForMerge: {
type: 'boolean',
name: 'wait_for_merge'
}
},
urls: [
{
fmt: '/<%=index%>/_forcemerge',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_forcemerge'
}
],
method: 'POST'
});
/**
* Perform a [indices.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Ignore unavailable indexes (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Ignore if a wildcard expression resolves to no concrete indices (default: false)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (default: open)
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether to return all default setting for each of the indices.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.feature - A comma-separated list of features
*/
api.indices.prototype.get = ca({
params: {
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
includeDefaults: {
type: 'boolean',
'default': false,
name: 'include_defaults'
}
},
urls: [
{
fmt: '/<%=index%>/<%=feature%>',
req: {
index: {
type: 'list'
},
feature: {
type: 'list',
options: [
'_settings',
'_mappings',
'_aliases'
]
}
}
},
{
fmt: '/<%=index%>',
req: {
index: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getAlias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=all] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to filter aliases
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - A comma-separated list of alias names to return
*/
api.indices.prototype.getAlias = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'all',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/_alias/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_alias',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_alias'
}
]
});
/**
* Perform a [indices.getFieldMapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-field-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether the default mapping values should be returned as well
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields
*/
api.indices.prototype.getFieldMapping = ca({
params: {
includeDefaults: {
type: 'boolean',
name: 'include_defaults'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>/field/<%=fields%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping/field/<%=fields%>',
req: {
index: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>/field/<%=fields%>',
req: {
type: {
type: 'list'
},
fields: {
type: 'list'
}
}
},
{
fmt: '/_mapping/field/<%=fields%>',
req: {
fields: {
type: 'list'
}
}
}
]
});
/**
* Perform a [indices.getMapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types
*/
api.indices.prototype.getMapping = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_mapping',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'list'
}
}
},
{
fmt: '/_mapping'
}
]
});
/**
* Perform a [indices.getSettings](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-get-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open,closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return version and creation date values in human-readable format.
* @param {<<api-param-type-boolean,`Boolean`>>} params.includeDefaults - Whether to return all default setting for each of the indices.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The name of the settings that should be included
*/
api.indices.prototype.getSettings = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': [
'open',
'closed'
],
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
local: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
includeDefaults: {
type: 'boolean',
'default': false,
name: 'include_defaults'
}
},
urls: [
{
fmt: '/<%=index%>/_settings/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
]
});
/**
* Perform a [indices.getTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.name - The comma separated names of the index templates
*/
api.indices.prototype.getTemplate = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'list'
}
}
},
{
fmt: '/_template'
}
]
});
/**
* Perform a [indices.getUpgrade](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.getUpgrade = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
]
});
/**
* Perform a [indices.open](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-open-close.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=closed] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma separated list of indices to open
*/
api.indices.prototype.open = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'closed',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
url: {
fmt: '/<%=index%>/_open',
req: {
index: {
type: 'list'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.putAlias](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices.
* @param {<<api-param-type-string,`String`>>} params.name - The name of the alias to be created or updated
*/
api.indices.prototype.putAlias = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/<%=index%>/_alias/<%=name%>',
req: {
index: {
type: 'list'
},
name: {
type: 'string'
}
}
},
method: 'PUT'
});
/**
* Perform a [indices.putMapping](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.updateAllTypes - Whether to update the mapping for all fields with the same name across all types or not
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices.
* @param {<<api-param-type-string,`String`>>} params.type - The name of the document type
*/
api.indices.prototype.putMapping = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
updateAllTypes: {
type: 'boolean',
name: 'update_all_types'
}
},
urls: [
{
fmt: '/<%=index%>/_mapping/<%=type%>',
req: {
index: {
type: 'list'
},
type: {
type: 'string'
}
}
},
{
fmt: '/_mapping/<%=type%>',
req: {
type: {
type: 'string'
}
}
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putSettings](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.preserveExisting - Whether to update existing settings. If set to `true` existing settings on an index remain unchanged, the default is `false`
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.putSettings = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
preserveExisting: {
type: 'boolean',
name: 'preserve_existing'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
urls: [
{
fmt: '/<%=index%>/_settings',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_settings'
}
],
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-templates.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
* @param {<<api-param-type-boolean,`Boolean`>>} params.create - Whether the index template should only be added if new or can also replace an existing one
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-string,`String`>>} params.name - The name of the template
*/
api.indices.prototype.putTemplate = ca({
params: {
order: {
type: 'number'
},
create: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
flatSettings: {
type: 'boolean',
name: 'flat_settings'
}
},
url: {
fmt: '/_template/<%=name%>',
req: {
name: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [indices.recovery](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-recovery.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Whether to display detailed information about shard recovery
* @param {<<api-param-type-boolean,`Boolean`>>} params.activeOnly - Display only those recoveries that are currently on-going
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.recovery = ca({
params: {
detailed: {
type: 'boolean',
'default': false
},
activeOnly: {
type: 'boolean',
'default': false,
name: 'active_only'
},
human: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_recovery',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_recovery'
}
]
});
/**
* Perform a [indices.refresh](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-refresh.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.force - Force a refresh even if not required
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.refresh = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
force: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_refresh',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_refresh'
}
],
method: 'POST'
});
/**
* Perform a [indices.rollover](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-rollover-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.dryRun - If set to true the rollover action will only be validated but not actually performed even if a condition matches. The default is false
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Set the number of active shards to wait for on the newly created rollover index before the operation returns.
* @param {<<api-param-type-string,`String`>>} params.alias - The name of the alias to rollover
* @param {<<api-param-type-string,`String`>>} params.newIndex - The name of the rollover index
*/
api.indices.prototype.rollover = ca({
params: {
timeout: {
type: 'time'
},
dryRun: {
type: 'boolean',
name: 'dry_run'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
}
},
urls: [
{
fmt: '/<%=alias%>/_rollover/<%=newIndex%>',
req: {
alias: {
type: 'string'
},
newIndex: {
type: 'string'
}
}
},
{
fmt: '/<%=alias%>/_rollover',
req: {
alias: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [indices.segments](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-segments.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-boolean,`Boolean`>>} params.verbose - Includes detailed memory usage by Lucene.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.segments = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
human: {
type: 'boolean',
'default': false
},
operationThreading: {
name: 'operation_threading'
},
verbose: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/<%=index%>/_segments',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_segments'
}
]
});
/**
* Perform a [indices.shardStores](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shards-stores.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.status - A comma-separated list of statuses used to filter on shards to get store information for
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.shardStores = ca({
params: {
status: {
type: 'list',
options: [
'green',
'yellow',
'red',
'all'
]
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
}
},
urls: [
{
fmt: '/<%=index%>/_shard_stores',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_shard_stores'
}
]
});
/**
* Perform a [indices.shrink](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Set the number of active shards to wait for on the shrunken index before the operation returns.
* @param {<<api-param-type-string,`String`>>} params.index - The name of the source index to shrink
* @param {<<api-param-type-string,`String`>>} params.target - The name of the target index to shrink into
*/
api.indices.prototype.shrink = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
}
},
url: {
fmt: '/<%=index%>/_shrink/<%=target%>',
req: {
index: {
type: 'string'
},
target: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [indices.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=indices] - Return stats aggregated at cluster, index or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned the specific metrics.
*/
api.indices.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'list'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'indices',
options: [
'cluster',
'indices',
'shards'
]
},
types: {
type: 'list'
}
},
urls: [
{
fmt: '/<%=index%>/_stats/<%=metric%>',
req: {
index: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/<%=index%>/_stats',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_stats'
}
]
});
/**
* Perform a [indices.updateAliases](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-aliases.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Request timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Specify timeout for connection to master
*/
api.indices.prototype.updateAliases = ca({
params: {
timeout: {
type: 'time'
},
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_aliases'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [indices.upgrade](http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-upgrade.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Specify whether the request should block until the all segments are upgraded (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.onlyAncientSegments - If true, only ancient (an older Lucene major release) segments will be upgraded
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
*/
api.indices.prototype.upgrade = ca({
params: {
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
onlyAncientSegments: {
type: 'boolean',
name: 'only_ancient_segments'
}
},
urls: [
{
fmt: '/<%=index%>/_upgrade',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_upgrade'
}
],
method: 'POST'
});
/**
* Perform a [indices.validateQuery](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-validate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Return detailed information about the error
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {anything} params.operationThreading - TODO: ?
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-boolean,`Boolean`>>} params.rewrite - Provide a more detailed explanation showing the actual Lucene query that will be executed.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
*/
api.indices.prototype.validateQuery = ca({
params: {
explain: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
operationThreading: {
name: 'operation_threading'
},
q: {
type: 'string'
},
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
lenient: {
type: 'boolean'
},
rewrite: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_validate/query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_validate/query',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_validate/query'
}
],
method: 'POST'
});
/**
* Perform a [info](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.info = ca({
url: {
fmt: '/'
}
});
api.ingest = namespace();
/**
* Perform a [ingest.deletePipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.id - Pipeline ID
*/
api.ingest.prototype.deletePipeline = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_ingest/pipeline/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [ingest.getPipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.id - Comma separated list of pipeline ids. Wildcards supported
*/
api.ingest.prototype.getPipeline = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
urls: [
{
fmt: '/_ingest/pipeline/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_ingest/pipeline'
}
]
});
/**
* Perform a [ingest.putPipeline](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.id - Pipeline ID
*/
api.ingest.prototype.putPipeline = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_ingest/pipeline/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [ingest.simulate](https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.verbose - Verbose mode. Display data output for each processor in executed pipeline
* @param {<<api-param-type-string,`String`>>} params.id - Pipeline ID
*/
api.ingest.prototype.simulate = ca({
params: {
verbose: {
type: 'boolean',
'default': false
}
},
urls: [
{
fmt: '/_ingest/pipeline/<%=id%>/_simulate',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_ingest/pipeline/_simulate'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mget](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-get.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return in the response
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specify whether to perform the operation in realtime or search mode
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Refresh the shard containing the document before performing the operation
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.mget = ca({
params: {
storedFields: {
type: 'list',
name: 'stored_fields'
},
preference: {
type: 'string'
},
realtime: {
type: 'boolean'
},
refresh: {
type: 'boolean'
},
routing: {
type: 'string'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mget',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mget',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mget'
}
],
needBody: true,
method: 'POST'
});
/**
* Perform a [mpercolate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being count percolated to use as default
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated to use as default.
*/
api.mpercolate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mpercolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mpercolate',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mpercolate'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearch](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.maxConcurrentSearches - Controls the maximum number of concurrent searches the multi search api will execute
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearch = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch'
],
name: 'search_type'
},
maxConcurrentSearches: {
type: 'number',
name: 'max_concurrent_searches'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [msearchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to use as default
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to use as default
*/
api.msearchTemplate = ca({
params: {
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch'
],
name: 'search_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_msearch/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_msearch/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_msearch/template'
}
],
needBody: true,
bulkBody: true,
method: 'POST'
});
/**
* Perform a [mtermvectors](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-multi-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.ids - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random) .Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents. Applies to all returned documents unless otherwise specified in body "params" or "docs".
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if requests are real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
*/
api.mtermvectors = ca({
params: {
ids: {
type: 'list',
required: false
},
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_mtermvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/_mtermvectors',
req: {
index: {
type: 'string'
}
}
},
{
fmt: '/_mtermvectors'
}
],
method: 'POST'
});
api.nodes = namespace();
/**
* Perform a [nodes.hotThreads](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-hot-threads.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.interval - The interval for the second sampling of threads
* @param {<<api-param-type-number,`Number`>>} params.snapshots - Number of samples of thread stacktrace (default: 10)
* @param {<<api-param-type-number,`Number`>>} params.threads - Specify the number of threads to provide information for (default: 3)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreIdleThreads - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true)
* @param {<<api-param-type-string,`String`>>} params.type - The type to sample (default: cpu)
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.hotThreads = ca({
params: {
interval: {
type: 'time'
},
snapshots: {
type: 'number'
},
threads: {
type: 'number'
},
ignoreIdleThreads: {
type: 'boolean',
name: 'ignore_idle_threads'
},
type: {
type: 'enum',
options: [
'cpu',
'wait',
'block'
]
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/hotthreads',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/hotthreads'
}
]
});
/**
* Perform a [nodes.info](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-info.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.flatSettings - Return settings in flat format (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - A comma-separated list of metrics you wish returned. Leave empty to return all.
*/
api.nodes.prototype.info = ca({
params: {
flatSettings: {
type: 'boolean',
name: 'flat_settings'
},
human: {
type: 'boolean',
'default': false
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins',
'ingest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'settings',
'os',
'process',
'jvm',
'thread_pool',
'transport',
'http',
'plugins',
'ingest'
]
}
}
},
{
fmt: '/_nodes'
}
]
});
/**
* Perform a [nodes.stats](http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-stats.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.completionFields - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields for `fielddata` index metric (supports wildcards)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards)
* @param {<<api-param-type-boolean,`Boolean`>>} params.groups - A comma-separated list of search groups for `search` index metric
* @param {<<api-param-type-boolean,`Boolean`>>} params.human - Whether to return time and byte values in human-readable format.
* @param {<<api-param-type-string,`String`>>} [params.level=node] - Return indices stats aggregated at index, node or shard level
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.types - A comma-separated list of document types for the `indexing` index metric
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.metric - Limit the information returned to the specified metrics
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.indexMetric - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
*/
api.nodes.prototype.stats = ca({
params: {
completionFields: {
type: 'list',
name: 'completion_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
fields: {
type: 'list'
},
groups: {
type: 'boolean'
},
human: {
type: 'boolean',
'default': false
},
level: {
type: 'enum',
'default': 'node',
options: [
'indices',
'node',
'shards'
]
},
types: {
type: 'list'
},
timeout: {
type: 'time'
}
},
urls: [
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>/<%=indexMetric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats/<%=metric%>',
req: {
nodeId: {
type: 'list'
},
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>/<%=indexMetric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
},
indexMetric: {
type: 'list',
options: [
'_all',
'completion',
'docs',
'fielddata',
'query_cache',
'flush',
'get',
'indexing',
'merge',
'percolate',
'request_cache',
'refresh',
'search',
'segments',
'store',
'warmer',
'suggest'
]
}
}
},
{
fmt: '/_nodes/<%=nodeId%>/stats',
req: {
nodeId: {
type: 'list'
}
}
},
{
fmt: '/_nodes/stats/<%=metric%>',
req: {
metric: {
type: 'list',
options: [
'_all',
'breaker',
'fs',
'http',
'indices',
'jvm',
'os',
'process',
'thread_pool',
'transport',
'discovery'
]
}
}
},
{
fmt: '/_nodes/stats'
}
]
});
/**
* Perform a [percolate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-percolate.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.percolateIndex - The index to percolate the document into. Defaults to index.
* @param {<<api-param-type-string,`String`>>} params.percolateType - The type to percolate document into. Defaults to type.
* @param {<<api-param-type-string,`String`>>} params.percolateRouting - The routing value to use when percolating the existing document.
* @param {<<api-param-type-string,`String`>>} params.percolatePreference - Which shard to prefer when executing the percolate request.
* @param {<<api-param-type-string,`String`>>} params.percolateFormat - Return an array of matching query IDs instead of objects
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document being percolated.
* @param {<<api-param-type-string,`String`>>} params.id - Substitute the document in the request body with a document that is known by the specified id. On top of the id, the index and type parameter will be used to retrieve the document from within the cluster.
*/
api.percolate = ca({
params: {
routing: {
type: 'list'
},
preference: {
type: 'string'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
percolateIndex: {
type: 'string',
name: 'percolate_index'
},
percolateType: {
type: 'string',
name: 'percolate_type'
},
percolateRouting: {
type: 'string',
name: 'percolate_routing'
},
percolatePreference: {
type: 'string',
name: 'percolate_preference'
},
percolateFormat: {
type: 'enum',
options: [
'ids'
],
name: 'percolate_format'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_percolate',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [ping](http://www.elastic.co/guide/) request
*
* @param {Object} params - An object with parameters used to carry out this action
*/
api.ping = ca({
url: {
fmt: '/'
},
requestTimeout: 3000,
method: 'HEAD'
});
/**
* Perform a [putScript](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Script ID
* @param {<<api-param-type-string,`String`>>} params.lang - Script language
*/
api.putScript = ca({
url: {
fmt: '/_scripts/<%=lang%>/<%=id%>',
req: {
lang: {
type: 'string'
},
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [putTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - Template ID
*/
api.putTemplate = ca({
url: {
fmt: '/_search/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
needBody: true,
method: 'PUT'
});
/**
* Perform a [reindex](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the reindex is complete.
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle.
* @param {<<api-param-type-number,`Number`>>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
*/
api.reindex = ca({
params: {
refresh: {
type: 'boolean'
},
timeout: {
type: 'time',
'default': '1m'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
},
requestsPerSecond: {
type: 'number',
'default': 0,
name: 'requests_per_second'
},
slices: {
type: 'integer',
'default': 1
}
},
url: {
fmt: '/_reindex'
},
needBody: true,
method: 'POST'
});
/**
* Perform a [reindexRethrottle](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-reindex.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle.
* @param {<<api-param-type-string,`String`>>} params.taskId - The task id to rethrottle
*/
api.reindexRethrottle = ca({
params: {
requestsPerSecond: {
type: 'number',
required: true,
name: 'requests_per_second'
}
},
url: {
fmt: '/_reindex/<%=taskId%>/_rethrottle',
req: {
taskId: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [renderSearchTemplate](http://www.elasticsearch.org/guide/en/elasticsearch/reference/master/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.id - The id of the stored search template
*/
api.renderSearchTemplate = ca({
urls: [
{
fmt: '/_render/template/<%=id%>',
req: {
id: {
type: 'string'
}
}
},
{
fmt: '/_render/template'
}
],
method: 'POST'
});
/**
* Perform a [scroll](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.scrollId - The scroll ID
*/
api.scroll = ca({
params: {
scroll: {
type: 'time'
},
scrollId: {
type: 'string',
name: 'scroll_id'
}
},
urls: [
{
fmt: '/_search/scroll/<%=scrollId%>',
req: {
scrollId: {
type: 'string'
}
}
},
{
fmt: '/_search/scroll'
}
],
paramAsBody: 'scrollId',
method: 'POST'
});
/**
* Perform a [search](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-search.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.storedFields - A comma-separated list of stored fields to return as part of a hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.docvalueFields - A comma-separated list of fields to return as the docvalue representation of a field for each hit
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fielddataFields - A comma-separated list of fields to return as the docvalue representation of a field for each hit
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-string,`String`>>} params.suggestField - Specify which field to use for suggestions
* @param {<<api-param-type-string,`String`>>} [params.suggestMode=missing] - Specify suggest mode
* @param {<<api-param-type-number,`Number`>>} params.suggestSize - How many suggestions to return in response
* @param {<<api-param-type-string,`String`>>} params.suggestText - The source text for which the suggestions should be returned
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.trackScores - Whether to calculate and return scores even if they are not used for sorting
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.search = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
explain: {
type: 'boolean'
},
storedFields: {
type: 'list',
name: 'stored_fields'
},
docvalueFields: {
type: 'list',
name: 'docvalue_fields'
},
fielddataFields: {
type: 'list',
name: 'fielddata_fields'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch'
],
name: 'search_type'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
suggestField: {
type: 'string',
name: 'suggest_field'
},
suggestMode: {
type: 'enum',
'default': 'missing',
options: [
'missing',
'popular',
'always'
],
name: 'suggest_mode'
},
suggestSize: {
type: 'number',
name: 'suggest_size'
},
suggestText: {
type: 'string',
name: 'suggest_text'
},
timeout: {
type: 'time'
},
trackScores: {
type: 'boolean',
name: 'track_scores'
},
version: {
type: 'boolean'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search'
}
],
method: 'POST'
});
/**
* Perform a [searchShards](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-shards.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchShards = ca({
params: {
preference: {
type: 'string'
},
routing: {
type: 'string'
},
local: {
type: 'boolean'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search_shards',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search_shards',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search_shards'
}
],
method: 'POST'
});
/**
* Perform a [searchTemplate](http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-boolean,`Boolean`>>} params.explain - Specify whether to return detailed information about score computation as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.profile - Specify whether to profile the query execution
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.searchTemplate = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'query_and_fetch',
'dfs_query_then_fetch',
'dfs_query_and_fetch'
],
name: 'search_type'
},
explain: {
type: 'boolean'
},
profile: {
type: 'boolean'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_search/template',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_search/template',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_search/template'
}
],
method: 'POST'
});
api.snapshot = namespace();
/**
* Perform a [snapshot.create](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.create = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.createRepository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-boolean,`Boolean`>>} params.verify - Whether to verify the repository after creation
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.createRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
},
verify: {
type: 'boolean'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'string'
}
}
},
needBody: true,
method: 'POST'
});
/**
* Perform a [snapshot.delete](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype['delete'] = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.deleteRepository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.deleteRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
method: 'DELETE'
});
/**
* Perform a [snapshot.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.get = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
}
});
/**
* Perform a [snapshot.getRepository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.local - Return local information, do not retrieve the state from master node (default: false)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.repository - A comma-separated list of repository names
*/
api.snapshot.prototype.getRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
local: {
type: 'boolean'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>',
req: {
repository: {
type: 'list'
}
}
},
{
fmt: '/_snapshot'
}
]
});
/**
* Perform a [snapshot.restore](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should this request wait until the operation has completed before returning
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>} params.snapshot - A snapshot name
*/
api.snapshot.prototype.restore = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_restore',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [snapshot.status](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.snapshot - A comma-separated list of snapshot names
*/
api.snapshot.prototype.status = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
}
},
urls: [
{
fmt: '/_snapshot/<%=repository%>/<%=snapshot%>/_status',
req: {
repository: {
type: 'string'
},
snapshot: {
type: 'list'
}
}
},
{
fmt: '/_snapshot/<%=repository%>/_status',
req: {
repository: {
type: 'string'
}
}
},
{
fmt: '/_snapshot/_status'
}
]
});
/**
* Perform a [snapshot.verifyRepository](http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-snapshots.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-duration-string,`DurationString`>>} params.masterTimeout - Explicit operation timeout for connection to master node
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-string,`String`>>} params.repository - A repository name
*/
api.snapshot.prototype.verifyRepository = ca({
params: {
masterTimeout: {
type: 'time',
name: 'master_timeout'
},
timeout: {
type: 'time'
}
},
url: {
fmt: '/_snapshot/<%=repository%>/_verify',
req: {
repository: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [suggest](http://www.elastic.co/guide/en/elasticsearch/reference/master/search-suggesters.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
*/
api.suggest = ca({
params: {
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
preference: {
type: 'string'
},
routing: {
type: 'string'
}
},
urls: [
{
fmt: '/<%=index%>/_suggest',
req: {
index: {
type: 'list'
}
}
},
{
fmt: '/_suggest'
}
],
needBody: true,
method: 'POST'
});
api.tasks = namespace();
/**
* Perform a [tasks.cancel](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
* @param {<<api-param-type-string,`String`>>} params.parentNode - Cancel tasks with specified parent node.
* @param {<<api-param-type-string,`String`>>} params.parentTask - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all.
* @param {<<api-param-type-string,`String`>>} params.taskId - Cancel the task with specified task id (node_id:task_number)
*/
api.tasks.prototype.cancel = ca({
params: {
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'string',
name: 'parent_task'
}
},
urls: [
{
fmt: '/_tasks/<%=taskId%>/_cancel',
req: {
taskId: {
type: 'string'
}
}
},
{
fmt: '/_tasks/_cancel'
}
],
method: 'POST'
});
/**
* Perform a [tasks.get](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Wait for the matching tasks to complete (default: false)
* @param {<<api-param-type-string,`String`>>} params.taskId - Return the task with specified id (node_id:task_number)
*/
api.tasks.prototype.get = ca({
params: {
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
}
},
url: {
fmt: '/_tasks/<%=taskId%>',
req: {
taskId: {
type: 'string'
}
}
}
});
/**
* Perform a [tasks.list](http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.nodeId - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.actions - A comma-separated list of actions that should be returned. Leave empty to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.detailed - Return detailed task information (default: false)
* @param {<<api-param-type-string,`String`>>} params.parentNode - Return tasks with specified parent node.
* @param {<<api-param-type-string,`String`>>} params.parentTask - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all.
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Wait for the matching tasks to complete (default: false)
* @param {<<api-param-type-string,`String`>>} [params.groupBy=nodes] - Group tasks by nodes or parent/child relationships
*/
api.tasks.prototype.list = ca({
params: {
nodeId: {
type: 'list',
name: 'node_id'
},
actions: {
type: 'list'
},
detailed: {
type: 'boolean'
},
parentNode: {
type: 'string',
name: 'parent_node'
},
parentTask: {
type: 'string',
name: 'parent_task'
},
waitForCompletion: {
type: 'boolean',
name: 'wait_for_completion'
},
groupBy: {
type: 'enum',
'default': 'nodes',
options: [
'nodes',
'parents'
],
name: 'group_by'
}
},
url: {
fmt: '/_tasks'
}
});
/**
* Perform a [termvectors](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-termvectors.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-boolean,`Boolean`>>} params.termStatistics - Specifies if total term frequency and document frequency should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.fieldStatistics=true] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.offsets=true] - Specifies if term offsets should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.positions=true] - Specifies if term positions should be returned.
* @param {<<api-param-type-boolean,`Boolean`>>} [params.payloads=true] - Specifies if term payloads should be returned.
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random).
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value.
* @param {<<api-param-type-string,`String`>>} params.parent - Parent id of documents.
* @param {<<api-param-type-boolean,`Boolean`>>} params.realtime - Specifies if request is real-time as opposed to near-real-time (default: true).
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.index - The index in which the document resides.
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document.
* @param {<<api-param-type-string,`String`>>} params.id - The id of the document, when not specified a doc param should be supplied.
*/
api.termvectors = ca({
params: {
termStatistics: {
type: 'boolean',
'default': false,
required: false,
name: 'term_statistics'
},
fieldStatistics: {
type: 'boolean',
'default': true,
required: false,
name: 'field_statistics'
},
fields: {
type: 'list',
required: false
},
offsets: {
type: 'boolean',
'default': true,
required: false
},
positions: {
type: 'boolean',
'default': true,
required: false
},
payloads: {
type: 'boolean',
'default': true,
required: false
},
preference: {
type: 'string',
required: false
},
routing: {
type: 'string',
required: false
},
parent: {
type: 'string',
required: false
},
realtime: {
type: 'boolean',
required: false
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'external',
'external_gte',
'force'
],
name: 'version_type'
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/<%=id%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
{
fmt: '/<%=index%>/<%=type%>/_termvectors',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
}
}
}
],
method: 'POST'
});
/**
* Perform a [update](http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.fields - A comma-separated list of fields to return in the response
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-string,`String`>>} params.lang - The script language (default: groovy)
* @param {<<api-param-type-string,`String`>>} params.parent - ID of the parent document. Is is only used for routing and when for the upsert request
* @param {<<api-param-type-string,`String`>>} params.refresh - If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.
* @param {<<api-param-type-number,`Number`>>} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
* @param {<<api-param-type-string,`String`>>} params.routing - Specific routing value
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timeout - Explicit operation timeout
* @param {<<api-param-type-duration-string,`DurationString`>>} params.timestamp - Explicit timestamp for the document
* @param {<<api-param-type-duration-string,`DurationString`>>} params.ttl - Expiration time for the document
* @param {<<api-param-type-number,`Number`>>} params.version - Explicit version number for concurrency control
* @param {<<api-param-type-string,`String`>>} params.versionType - Specific version type
* @param {<<api-param-type-string,`String`>>} params.id - Document ID
* @param {<<api-param-type-string,`String`>>} params.index - The name of the index
* @param {<<api-param-type-string,`String`>>} params.type - The type of the document
*/
api.update = ca({
params: {
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
fields: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
lang: {
type: 'string'
},
parent: {
type: 'string'
},
refresh: {
type: 'enum',
options: [
'true',
'false',
'wait_for',
''
]
},
retryOnConflict: {
type: 'number',
name: 'retry_on_conflict'
},
routing: {
type: 'string'
},
timeout: {
type: 'time'
},
timestamp: {
type: 'time'
},
ttl: {
type: 'time'
},
version: {
type: 'number'
},
versionType: {
type: 'enum',
options: [
'internal',
'force'
],
name: 'version_type'
}
},
url: {
fmt: '/<%=index%>/<%=type%>/<%=id%>/_update',
req: {
index: {
type: 'string'
},
type: {
type: 'string'
},
id: {
type: 'string'
}
}
},
method: 'POST'
});
/**
* Perform a [updateByQuery](https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-update-by-query.html) request
*
* @param {Object} params - An object with parameters used to carry out this action
* @param {<<api-param-type-string,`String`>>} params.analyzer - The analyzer to use for the query string
* @param {<<api-param-type-boolean,`Boolean`>>} params.analyzeWildcard - Specify whether wildcard and prefix queries should be analyzed (default: false)
* @param {<<api-param-type-string,`String`>>} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
* @param {<<api-param-type-string,`String`>>} params.df - The field to use as default where no field prefix is given in the query string
* @param {<<api-param-type-number,`Number`>>} params.from - Starting offset (default: 0)
* @param {<<api-param-type-boolean,`Boolean`>>} params.ignoreUnavailable - Whether specified concrete indices should be ignored when unavailable (missing or closed)
* @param {<<api-param-type-boolean,`Boolean`>>} params.allowNoIndices - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
* @param {<<api-param-type-string,`String`>>} [params.conflicts=abort] - What to do when the update by query hits version conflicts?
* @param {<<api-param-type-string,`String`>>} [params.expandWildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both.
* @param {<<api-param-type-boolean,`Boolean`>>} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
* @param {<<api-param-type-string,`String`>>} params.pipeline - Ingest pipeline to set on index requests made by this action. (default: none)
* @param {<<api-param-type-string,`String`>>} params.preference - Specify the node or shard the operation should be performed on (default: random)
* @param {<<api-param-type-string,`String`>>} params.q - Query in the Lucene query string syntax
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.routing - A comma-separated list of specific routing values
* @param {<<api-param-type-duration-string,`DurationString`>>} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
* @param {<<api-param-type-string,`String`>>} params.searchType - Search operation type
* @param {<<api-param-type-duration-string,`DurationString`>>} params.searchTimeout - Explicit timeout for each search request. Defaults to no timeout.
* @param {<<api-param-type-number,`Number`>>} params.size - Number of hits to return (default: 10)
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.sort - A comma-separated list of <field>:<direction> pairs
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._source - True or false to return the _source field or not, or a list of fields to return
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceExclude - A list of fields to exclude from the returned _source field
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params._sourceInclude - A list of fields to extract and return from the _source field
* @param {<<api-param-type-number,`Number`>>} params.terminateAfter - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.stats - Specific 'tag' of the request for logging and statistical purposes
* @param {<<api-param-type-boolean,`Boolean`>>} params.version - Specify whether to return document version as part of a hit
* @param {<<api-param-type-boolean,`Boolean`>>} params.versionType - Should the document increment the version number (internal) on hit or not (reindex)
* @param {<<api-param-type-boolean,`Boolean`>>} params.requestCache - Specify if request cache should be used for this request or not, defaults to index level setting
* @param {<<api-param-type-boolean,`Boolean`>>} params.refresh - Should the effected indexes be refreshed?
* @param {<<api-param-type-duration-string,`DurationString`>>} [params.timeout=1m] - Time each individual bulk request should wait for shards that are unavailable.
* @param {<<api-param-type-string,`String`>>} params.waitForActiveShards - Sets the number of shard copies that must be active before proceeding with the update by query operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1)
* @param {<<api-param-type-number,`Number`>>} params.scrollSize - Size on the scroll request powering the update_by_query
* @param {<<api-param-type-boolean,`Boolean`>>} params.waitForCompletion - Should the request should block until the update by query operation is complete.
* @param {<<api-param-type-number,`Number`>>} params.requestsPerSecond - The throttle to set on this request in sub-requests per second. -1 means no throttle.
* @param {<<api-param-type-number,`Number`>>} [params.slices=1] - The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks.
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
* @param {<<api-param-type-string,`String`>>, <<api-param-type-string-array,`String[]`>>, <<api-param-type-boolean,`Boolean`>>} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
*/
api.updateByQuery = ca({
params: {
analyzer: {
type: 'string'
},
analyzeWildcard: {
type: 'boolean',
name: 'analyze_wildcard'
},
defaultOperator: {
type: 'enum',
'default': 'OR',
options: [
'AND',
'OR'
],
name: 'default_operator'
},
df: {
type: 'string'
},
from: {
type: 'number'
},
ignoreUnavailable: {
type: 'boolean',
name: 'ignore_unavailable'
},
allowNoIndices: {
type: 'boolean',
name: 'allow_no_indices'
},
conflicts: {
type: 'enum',
'default': 'abort',
options: [
'abort',
'proceed'
]
},
expandWildcards: {
type: 'enum',
'default': 'open',
options: [
'open',
'closed',
'none',
'all'
],
name: 'expand_wildcards'
},
lenient: {
type: 'boolean'
},
pipeline: {
type: 'string'
},
preference: {
type: 'string'
},
q: {
type: 'string'
},
routing: {
type: 'list'
},
scroll: {
type: 'time'
},
searchType: {
type: 'enum',
options: [
'query_then_fetch',
'dfs_query_then_fetch'
],
name: 'search_type'
},
searchTimeout: {
type: 'time',
name: 'search_timeout'
},
size: {
type: 'number'
},
sort: {
type: 'list'
},
_source: {
type: 'list'
},
_sourceExclude: {
type: 'list',
name: '_source_exclude'
},
_sourceInclude: {
type: 'list',
name: '_source_include'
},
terminateAfter: {
type: 'number',
name: 'terminate_after'
},
stats: {
type: 'list'
},
version: {
type: 'boolean'
},
versionType: {
type: 'boolean',
name: 'version_type'
},
requestCache: {
type: 'boolean',
name: 'request_cache'
},
refresh: {
type: 'boolean'
},
timeout: {
type: 'time',
'default': '1m'
},
waitForActiveShards: {
type: 'string',
name: 'wait_for_active_shards'
},
scrollSize: {
type: 'number',
name: 'scroll_size'
},
waitForCompletion: {
type: 'boolean',
'default': false,
name: 'wait_for_completion'
},
requestsPerSecond: {
type: 'number',
'default': 0,
name: 'requests_per_second'
},
slices: {
type: 'integer',
'default': 1
}
},
urls: [
{
fmt: '/<%=index%>/<%=type%>/_update_by_query',
req: {
index: {
type: 'list'
},
type: {
type: 'list'
}
}
},
{
fmt: '/<%=index%>/_update_by_query',
req: {
index: {
type: 'list'
}
}
}
],
method: 'POST'
});
|
| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| _keep_alive_agent.js | 58.82% | (20 / 34) | 50% | (1 / 2) | 14.29% | (1 / 7) | 62.5% | (20 / 32) | |
| http.js | 14.43% | (14 / 97) | 0% | (0 / 46) | 0% | (0 / 13) | 14.58% | (14 / 96) | |
| index.js | 100% | (1 / 1) | 100% | (0 / 0) | 100% | (0 / 0) | 100% | (1 / 1) |
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | var ForeverAgent = require('forever-agent');
var ForeverSSLAgent = require('forever-agent').SSL;
var NativeAgent = require('http').Agent;
var NativeSSLAgent = require('https').Agent;
var inherits = require('util').inherits;
var nativeKeepAlive = (function () {
var a = new NativeAgent();
return !!a.freeSockets;
}());
function WrapForeverAgent(opts) {
ForeverAgent.call(this, opts);
var _addRequest = this.addRequest;
this.addRequest = function (req, host, port) {
req.useChunkedEncodingByDefault = false;
_addRequest.call(this, req, host, port);
};
}
inherits(WrapForeverAgent, ForeverAgent);
function WrapForeverSSLAgent(opts) {
ForeverSSLAgent.call(this, opts);
var _addRequest = this.addRequest;
this.addRequest = function (req, host, port) {
req.useChunkedEncodingByDefault = false;
_addRequest.call(this, req, host, port);
};
}
inherits(WrapForeverSSLAgent, ForeverSSLAgent);
function WrapNativeAgent(opts) { NativeAgent.call(this, opts); }
inherits(WrapNativeAgent, NativeAgent);
function WrapNativeSSLAgent(opts) { NativeSSLAgent.call(this, opts); }
inherits(WrapNativeSSLAgent, NativeSSLAgent);
Eif (nativeKeepAlive) {
module.exports = WrapNativeAgent;
module.exports.SSL = WrapNativeSSLAgent;
} else {
module.exports = WrapForeverAgent;
module.exports.SSL = WrapForeverSSLAgent;
}
module.exports.supportsNativeKeepAlive = nativeKeepAlive;
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | /**
* A Connection that operates using Node's http module
*
* @param client {Client} - The Client that this class belongs to
* @param config {Object} - Configuration options
* @param [config.protocol=http:] {String} - The HTTP protocol that this connection will use, can be set to https:
* @class HttpConnector
*/
module.exports = HttpConnector;
var handles = {
http: require('http'),
https: require('https')
};
var _ = require('../utils');
var qs = require('querystring');
var KeepAliveAgent = require('./_keep_alive_agent');
var ConnectionAbstract = require('../connection');
var zlib = require('zlib');
/**
* Connector used to talk to an elasticsearch node via HTTP
*
* @param {Host} host - The host object representing the elasticsearch node we will be talking to
* @param {Object} [config] - Configuration options (extends the configuration options for ConnectionAbstract)
* @param {Number} [config.concurrency=10] - the maximum number of sockets that will be opened to this node
*/
function HttpConnector(host, config) {
ConnectionAbstract.call(this, host, config);
this.hand = handles[this.host.protocol];
if (!this.hand) {
throw new TypeError('Invalid protocol "' + this.host.protocol +
'", expected one of ' + _.keys(handles).join(', '));
}
this.useSsl = this.host.protocol === 'https';
config = _.defaults(config || {}, {
keepAlive: true,
minSockets: 10,
// 10 makes sense but 11 actually keeps 10 sockets around
// https://github.com/mikeal/forever-agent/issues/8
maxSockets: 11
});
this.agent = config.createNodeAgent ? config.createNodeAgent(this, config) : this.createAgent(config);
}
_.inherits(HttpConnector, ConnectionAbstract);
HttpConnector.prototype.onStatusSet = _.handler(function (status) {
if (status === 'closed') {
var agent = this.agent;
var toRemove = [];
var collectSockets = function (sockets, host) {
_.each(sockets, function (s) {
if (s) toRemove.push([host, s]);
});
};
agent.minSockets = agent.maxSockets = 0;
agent.requests = {};
_.each(agent.sockets, collectSockets);
_.each(agent.freeSockets, collectSockets);
_.each(toRemove, function (args) {
var host = args[0], socket = args[1];
agent.removeSocket(socket, host);
socket.destroy();
});
}
});
HttpConnector.prototype.createAgent = function (config) {
var Agent = this.hand.Agent; // the class
if (config.forever) {
config.keepAlive = config.forever;
}
if (config.keepAlive) {
Agent = this.useSsl ? KeepAliveAgent.SSL : KeepAliveAgent;
this.on('status set', this.bound.onStatusSet);
}
return new Agent(this.makeAgentConfig(config));
};
HttpConnector.prototype.makeAgentConfig = function (config) {
var agentConfig = {
/*
* As HTTP/HTTPS Agent defaults keepAlive to false, in the case where we
* desire HTTP keep-alive, we need to set it appropriately. This could be
* done in the wrapper, but I don't see any good reason not to simply set
* it here. ¯\_(ツ)_/¯
*
* https://github.com/elastic/elasticsearch-js/issues/107
*/
keepAlive: config.keepAlive,
maxSockets: config.maxSockets,
minSockets: config.minSockets
};
if (this.useSsl) {
_.merge(agentConfig, this.host.ssl);
}
return agentConfig;
};
HttpConnector.prototype.makeReqParams = function (params) {
params = params || {};
var host = this.host;
var reqParams = {
method: params.method || 'GET',
protocol: host.protocol + ':',
hostname: host.host,
port: host.port,
path: (host.path || '') + (params.path || ''),
headers: host.getHeaders(params.headers),
agent: this.agent
};
if (!reqParams.path) {
reqParams.path = '/';
}
var query = host.getQuery(params.query);
if (query) {
reqParams.path = reqParams.path + '?' + qs.stringify(query);
}
return reqParams;
};
HttpConnector.prototype.request = function (params, cb) {
var incoming;
var timeoutId;
var request;
var status = 0;
var headers = {};
var log = this.log;
var response;
var reqParams = this.makeReqParams(params);
// general clean-up procedure to run after the request
// completes, has an error, or is aborted.
var cleanUp = _.bind(function (err) {
clearTimeout(timeoutId);
request && request.removeAllListeners();
incoming && incoming.removeAllListeners();
if ((err instanceof Error) === false) {
err = void 0;
}
log.trace(params.method, reqParams, params.body, response, status);
if (err) {
cb(err);
} else {
cb(err, response, status, headers);
}
}, this);
request = this.hand.request(reqParams, function (_incoming) {
incoming = _incoming;
status = incoming.statusCode;
headers = incoming.headers;
response = '';
var encoding = (headers['content-encoding'] || '').toLowerCase();
if (encoding === 'gzip' || encoding === 'deflate') {
incoming = incoming.pipe(zlib.createUnzip());
}
incoming.setEncoding('utf8');
incoming.on('data', function (d) {
response += d;
});
incoming.on('error', cleanUp);
incoming.on('end', cleanUp);
});
request.on('error', cleanUp);
request.setNoDelay(true);
request.setSocketKeepAlive(true);
if (params.body) {
request.setHeader('Content-Length', Buffer.byteLength(params.body, 'utf8'));
request.end(params.body);
} else {
request.setHeader('Content-Length', 0);
request.end();
}
return function () {
request.abort();
};
};
|
| 1 2 3 4 5 6 | 1 | module.exports = {
http: require('./http'),
_default: 'http'
};
|
| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| file.js | 50% | (7 / 14) | 0% | (0 / 6) | 0% | (0 / 2) | 50% | (7 / 14) | |
| index.js | 100% | (1 / 1) | 100% | (0 / 0) | 100% | (0 / 0) | 100% | (1 / 1) | |
| stdio.js | 53.85% | (14 / 26) | 0% | (0 / 8) | 0% | (0 / 7) | 53.85% | (14 / 26) | |
| stream.js | 40.91% | (9 / 22) | 0% | (0 / 7) | 0% | (0 / 5) | 40.91% | (9 / 22) | |
| tracer.js | 36.67% | (11 / 30) | 0% | (0 / 14) | 0% | (0 / 5) | 36.67% | (11 / 30) |
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | 1 1 1 1 1 1 1 | /**
* Logger that writes to a file
*
* @class Loggers.File
* @extends StreamLogger
* @constructor
* @param {Object} config - The configuration for the Logger (See LoggerAbstract for generic options)
* @param {String} config.path - The location to write
* @param {Log} bridge - The object that triggers logging events, which we will record
*/
module.exports = File;
var StreamLogger = require('./stream');
var _ = require('../utils');
var fs = require('fs');
function File(log, config) {
config = config || {};
// we should probably through an error if they don't support a path
this.path = config.path || 'elasticsearch.log';
// yahoo!
config.stream = fs.createWriteStream(this.path, {
flags: 'a',
encoding: 'utf8'
});
StreamLogger.call(this, log, config);
}
_.inherits(File, StreamLogger);
File.prototype.onProcessExit = _.handler(function () {
var toWrite = _.getUnwrittenFromStream(this.stream);
if (toWrite) {
fs.appendFileSync(this.path, toWrite);
}
});
|
| 1 2 3 4 5 6 7 8 | 1 | module.exports = {
file: require('./file'),
stream: require('./stream'),
stdio: require('./stdio'),
tracer: require('./tracer')
};
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | 1 1 1 1 1 1 1 1 1 1 1 1 1 1 | /**
* Special version of the Stream logger, which logs errors and warnings to stderr and all other
* levels to stdout.
*
* @class Loggers.Stdio
* @extends LoggerAbstract
* @constructor
* @param {Object} config - The configuration for the Logger
* @param {string} config.level - The highest log level for this logger to output.
* @param {Log} bridge - The object that triggers logging events, which we will record
*/
module.exports = Stdio;
var chalk = require('chalk');
// let the user define if they want color in the client config.
chalk.enabled = true;
var LoggerAbstract = require('../logger');
var _ = require('../utils');
var defaultColors = {
error: chalk.red.bold,
warning: chalk.yellow.bold,
info: chalk.cyan.bold,
debug: chalk.magenta.bold,
trace: chalk.white.bold
};
function Stdio(log, config) {
LoggerAbstract.call(this, log, config);
// config/state
this.color = !!(_.has(config, 'color') ? config.color : chalk.supportsColor);
this.colors = _.defaults(config.colors || {}, defaultColors);
}
_.inherits(Stdio, LoggerAbstract);
/**
* Sends output to a stream, does some formatting first
*
* @method write
* @private
* @param {WritableStream} to - The stream that should receive this message
* @param {String} label - The text that should be used at the beginning the message
* @param {function} colorize - A function that receives a string and returned a colored version of it
* @param {*} what - The message to log
* @return {undefined}
*/
Stdio.prototype.write = function (label, message, to, colorize) {
label = 'Elasticsearch ' + label;
if (this.color) {
label = colorize(label);
}
to.write(this.format(label, message));
};
/**
* Handler for the bridges "error" event
*
* @method onError
* @private
* @param {Error} e - The Error object to log
* @return {undefined}
*/
Stdio.prototype.onError = _.handler(function (e) {
this.write(e.name === 'Error' ? 'ERROR' : e.name, e.stack, process.stderr, this.colors.error);
});
/**
* Handler for the bridges "warning" event
*
* @method onWarning
* @private
* @param {String} msg - The message to be logged
* @return {undefined}
*/
Stdio.prototype.onWarning = _.handler(function (msg) {
this.write('WARNING', msg, process.stderr, this.colors.warning);
});
/**
* Handler for the bridges "info" event
*
* @method onInfo
* @private
* @param {String} msg - The message to be logged
* @return {undefined}
*/
Stdio.prototype.onInfo = _.handler(function (msg) {
this.write('INFO', msg, process.stdout, this.colors.info);
});
/**
* Handler for the bridges "debug" event
*
* @method onDebug
* @private
* @param {String} msg - The message to be logged
* @return {undefined}
*/
Stdio.prototype.onDebug = _.handler(function (msg) {
this.write('DEBUG', msg, process.stdout, this.colors.debug);
});
/**
* Handler for the bridges "trace" event
*
* @method onTrace
* @private
* @return {undefined}
*/
Stdio.prototype.onTrace = _.handler(function (message) {
this.write('TRACE', this._formatTraceMessage(message), process.stdout, this.colors.trace);
});
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | 1 1 1 1 1 1 1 1 1 | /**
* Logger that writes to a file
*
* @class Loggers.Stream
* @extends LoggerAbstract
* @constructor
* @see LoggerAbstract
* @param {Object} config - The configuration for the Logger (See LoggerAbstract for generic options)
* @param {String} config.path - The location to write
* @param {Log} bridge - The object that triggers logging events, which we will record
*/
module.exports = Stream;
var LoggerAbstract = require('../logger');
var _ = require('../utils');
function Stream(log, config) {
LoggerAbstract.call(this, log, config);
if (config.stream && config.stream.write && config.stream.end) {
this.stream = config.stream;
} else {
throw new TypeError('Invalid stream, use an instance of stream.Writable');
}
process.once('exit', this.bound.onProcessExit);
}
_.inherits(Stream, LoggerAbstract);
Stream.prototype.cleanUpListeners = _.handler(function () {
process.removeListener('exit', this.bound.onProcessExit);
LoggerAbstract.prototype.cleanUpListeners.call(this);
});
// flush the write buffer to stderr synchronously
Stream.prototype.onProcessExit = _.handler(function () {
// process is dying, lets manually flush the buffer synchronously to stderr.
var unwritten = _.getUnwrittenFromStream(this.stream);
if (unwritten) {
console.error('Log stream did not get to finish writing. Flushing to stderr');
console.error(unwritten);
}
});
Stream.prototype.write = function (label, message) {
this.stream.write(this.format(label, message), 'utf8');
};
Stream.prototype.close = function () {
this.stream.end();
};
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | 1 1 1 1 1 1 1 1 1 1 1 | /**
* Logger that writes to a file, but the file can be executed as a shell script,
* meaning everything but the curl commands are commented out
*
* @class Loggers.Tracer
* @extends StreamLogger
* @constructor
* @param {Object} config - The configuration for the Logger (See LoggerAbstract for generic options)
* @param {String} config.path - The location to write
* @param {Log} bridge - The object that triggers logging events, which we will record
*/
module.exports = Tracer;
var StreamLogger = require('./stream');
var fs = require('fs');
var _ = require('../utils');
var url = require('url');
function Tracer(log, config) {
if (config.path === false) {
config.stream = process.stderr;
} else {
config.stream = fs.createWriteStream(config.path || 'elasticsearch-tracer.log');
}
this.curlHost = config.curlHost || 'localhost';
this.curlPort = config.curlPort || 9200;
StreamLogger.call(this, log, config);
}
_.inherits(Tracer, StreamLogger);
var usefulUrlFields = ['protocol', 'slashes', 'port', 'hostname', 'pathname', 'query'];
Tracer.prototype._formatTraceMessage = function (req) {
var reqUrl = _.pick(url.parse(req.url, true, false), usefulUrlFields);
var originalHost = url.format(_.pick(reqUrl, 'protocol', 'hostname', 'port'));
reqUrl.port = this.curlPort;
reqUrl.hostname = this.curlHost;
reqUrl.query = _.defaults(reqUrl.query || {}, { pretty: true });
/* jshint quotmark: double */
var curlCall =
'# ' + originalHost + '\n' +
"curl '" + url.format(reqUrl).replace(/'/g, "\\'") + "' -X" + req.method.toUpperCase() +
(req.body ? " -d '" + this._prettyJson(req.body) + "'" : '');
/* jshint quotmark: single */
return {
curl: curlCall,
msg: '-> ' + req.status + '\n' + req.response
};
};
function comment(str) {
return _.map(str.split(/\r?\n/g), function (line) {
return '# ' + line;
}).join('\n');
}
Tracer.prototype.write = function (label, msg) {
var lead = comment(label + ': ' + this.timestamp()) + '\n';
if (typeof msg === 'string') {
this.stream.write(lead + comment(msg) + '\n\n', 'utf8');
} else {
this.stream.write(lead + msg.curl + '\n' + comment(msg.msg) + '\n\n', 'utf8');
}
};
|
| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| index.js | 100% | (1 / 1) | 100% | (0 / 0) | 100% | (0 / 0) | 100% | (1 / 1) | |
| random.js | 50% | (1 / 2) | 100% | (0 / 0) | 0% | (0 / 1) | 50% | (1 / 2) | |
| round_robin.js | 25% | (1 / 4) | 100% | (0 / 0) | 0% | (0 / 1) | 25% | (1 / 4) |
| 1 2 3 4 5 6 | 1 | module.exports = {
random: require('./random'),
roundRobin: require('./round_robin')
};
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 | /**
* Selects a connection randomly
*
* @module selectors
* @type {Function}
* @param {Array} connection - The list of connections to choose from
* @return {Connection} - The selected connection
*/
module.exports = function RandomSelector(connections) {
return connections[Math.floor(Math.random() * connections.length)];
};
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1 | /**
* Selects a connection the simplest way possible, Round Robin
*
* @module selectors
* @type {Function}
* @param {Array} connections - The list of connections that this selector needs to choose from
* @return {Connection} - The selected connection
*/
module.exports = function (connections) {
var connection = connections[0];
connections.push(connections.shift());
return connection;
};
|
| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| angular.js | 54.55% | (6 / 11) | 0% | (0 / 5) | 0% | (0 / 2) | 60% | (6 / 10) | |
| index.js | 100% | (1 / 1) | 100% | (0 / 0) | 100% | (0 / 0) | 100% | (1 / 1) | |
| json.js | 33.33% | (8 / 24) | 0% | (0 / 13) | 0% | (0 / 4) | 33.33% | (8 / 24) |
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 1 1 1 1 1 1 | /* global angular */
var _ = require('../utils');
var JsonSerializer = require('../serializers/json');
function AngularSerializer() {}
_.inherits(AngularSerializer, JsonSerializer);
// mimic the JsonSerializer's encode method, but use angular's toJson instead
AngularSerializer.prototype.encode = function (val) {
switch (typeof val) {
case 'string':
return val;
case 'object':
if (val) return angular.toJson(val);
/* falls through */
default:
return;
}
};
module.exports = AngularSerializer;
|
| 1 2 3 4 5 6 | 1 | module.exports = {
angular: require('./angular'),
json: require('./json')
};
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | 1 1 1 1 1 1 1 1 | /**
* Simple JSON serializer
* @type {[type]}
*/
module.exports = Json;
var _ = require('../utils');
function Json() {}
/**
* Converts a value into a string, or an error
* @param {*} val - Any value, methods are stripped and
* see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify about other params
* @return {String|Error} - A string is always returned, unless an error occured. then it will be that error.
*/
Json.prototype.serialize = function (val, replacer, spaces) {
switch (typeof val) {
case 'string':
return val;
case 'object':
if (val) {
return JSON.stringify(val, replacer, spaces);
}
/* falls through */
default:
return;
}
};
Json.prototype.serialize.contentType = 'application/json';
/**
* Parse a JSON string, if it is already parsed it is ignored
* @param {String} str - the string to parse
* @return {[type]}
*/
Json.prototype.deserialize = function (str) {
if (typeof str === 'string') {
try {
return JSON.parse(str);
} catch (e) {}
}
};
Json.prototype.bulkBody = function (val) {
var body = '', i;
if (_.isArray(val)) {
for (i = 0; i < val.length; i++) {
body += this.serialize(val[i]) + '\n';
}
} else if (typeof val === 'string') {
// make sure the string ends in a new line
body = val + (val[val.length - 1] === '\n' ? '' : '\n');
} else {
throw new TypeError('Bulk body should either be an Array of commands/string, or a String');
}
return body;
};
Json.prototype.bulkBody.contentType = 'application/x-ldjson';
|
| File | Statements | Branches | Functions | Lines | |||||
|---|---|---|---|---|---|---|---|---|---|
| find_common_protocol.js | 22.22% | (2 / 9) | 0% | (0 / 4) | 0% | (0 / 1) | 25% | (2 / 8) | |
| sniff_on_connection_fault.js | 8.33% | (2 / 24) | 0% | (0 / 9) | 0% | (0 / 6) | 8.33% | (2 / 24) |
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1 1 | var isEmpty = require('lodash').isEmpty;
module.exports = function (hosts) {
if (isEmpty(hosts)) return false;
var commonProtocol = hosts.shift().protocol;
for (var i = 0; i < hosts.length; i++) {
if (commonProtocol !== hosts[i].protocol) {
return false;
}
}
return commonProtocol;
}
|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 | 1 1 | var _ = require('../utils');
/**
* Patch the transport's connection pool to schedule a sniff after a connection fails.
* When a connection fails for the first time it will schedule a sniff 1 second in the
* future, and increase the timeout based on the deadTimeout algorithm chosen by the
* connectionPool, and the number of times the sniff has failed.
*
* @param {Transport} transport - the transport that will be using this behavior
* @return {undefined}
*/
module.exports = function setupSniffOnConnectionFault(transport) {
var failures = 0;
var pool = transport.connectionPool;
var originalOnDied = pool._onConnectionDied;
// do the actual sniff, if the sniff is unable to
// connect to a node this function will be called again by the connectionPool
var work = function () {
work.timerId = transport._timeout(work.timerId);
transport.sniff();
};
// create a function that will count down to a
// point n milliseconds into the future
var countdownTo = function (ms) {
var start = _.now();
return function () {
return start - ms;
};
};
// overwrite the function, but still call it
pool._onConnectionDied = function (connection, wasAlreadyDead) {
var ret = originalOnDied.call(pool, connection, wasAlreadyDead);
// clear the failures if this is the first failure we have seen
failures = work.timerId ? failures + 1 : 0;
var ms = pool.calcDeadTimeout(failures, 1000);
if (work.timerId && ms < work.timerId && work.countdown()) {
// clear the timer
work.timerId = transport._timeout(work.timerId);
}
if (!work.timerId) {
work.timerId = transport._timeout(work, ms);
work.countdown = countdownTo(ms);
}
return ret;
};
pool._onConnectionDied.restore = function () {
pool._onConnectionDied = originalOnDied;
};
};
|